Environmental Engineering Reference
In-Depth Information
figure;
if gcontf % filled contours
contourf (x,y,h,gcontf,'w');
colormap (winter);
colorbar; hold on;
end
if gquiv
quiver (x,y,u,v,'y'); hold on; % arrow field
end
With the gcontf parameter there is the option to plot filled contours of head
values. If such a plot is not wanted, set the parameter to zero. gcontf not only
serves as a switch for contour plots; it also contains the number of contours to be
plotted. The contours' color is white (formal parameter 'w' ).
The MATLAB
® colormap command determines the use of colors in the plot.
The default colormap is jet , which has all colours of the rainbow. Here we select
the winter colormap, in which the colors blue and green are preferred. The user
may select other predefined colormaps. It is most convenient to explore colormaps
from the figure editor. Use the 'Colormap
' sub-menu entry of the 'Edit' main
entry in the figure editor. Figure 14.4 depicts the colormap editor and the choice of
pre-defined colormaps.
The colorbar command displays a colorbar next to the figure, on the right. The
colorbar relates the colors to numbers, e.g. to head values in the given example.
...
Fig. 14.4 Colormap editor
Search WWH ::




Custom Search