Contour lines can be plotted on a surface, or filled contours can be drawn, or both, by means of the two functions plzcont (plot z contours, i. e., contours according to height in the z direction) and pl4cont (plot 4D contours, i. e., contours determined by some other function defined on the surface.
plzcont plots z contours, and pl4cont plots contours derived from the function values. nverts and xyzverts specify the polygons which define the surface. nverts is an array of integers, the ith entry of which gives the number of vertices of the ith polygonal cell; xyzverts are the vertices of the coordinatesof the cells, with each consecutive nv [i] entries representing the vertices of the ith cell; and values (for pl4cont) being a set of values, one for each vertex. These arguments are the same format as returned by slice3 and slice3mesh ( see Section 7.4.2 "slice3: Plane and Isosurface Slices of a 3-D mesh" on page 65). plzcont and pl4cont actually do repeated calls to slice2x (see Section 7.4.3 "slice2 and slice2x: Slicing Surfaces with planes" on page 66) in order to obtain the contour curves.
can be one of the following: N, an integer: Plot N contours (therefore, N+1 colored components of the surface) CVALS, a vector of floats: draw the contours at the specified levels.
can be "lin", "log", or "normal" specifying the contour scale. (Only applicable if contours = N, of course).
If CLEAR == 1, clear the display list first. Otherwise the current contour plot will be added to the display list.
If EDGES == 1, plot the edges.
If color == None, then bytscl the palette into N + 1 colors and send each of the slices to pl3tree with the appropriate color. If color == "bg", will plot only the edges. See also split (below).
If CMIN is given, use it instead of the minimum c actually being plotted in the computation of contour levels. If CMAX is given, use it instead of the maximum c actually being plotted in the computation of contour levels. This is done so that a component of a larger graph will have the same colors at the same levels as every other component, rather than its levels being based on its own maximum and minimum, which may lie inside or outside those of the rest of the graph.
ZAXIS_MIN and ZAXIS_MAX represent axis limits on z as expressed by the user. If present, ZAXIS_MIN will inhibit plotting of all lesser z values, and ZAXIS_MAX will inhibit the plotting of all greater z values.
CAXIS_MIN and CAXIS_MAX represent axis limits on c as expressed by the user. If present, CAXIS_MIN will inhibit plotting of all lesser c values, and CAXIS_MAX will inhibit the plotting of all greater c values.
If split == 1, then it is intended to plot this portion of the graph as if the palette has been split, so only colors 0-99 will be used to color the contours. If split == 0, then all colors from 0 to 199 will be used.
In the following example, we compute the sombrero function and then use plzcont to draw it with contours in "normal" scale. In "normal" scale, the top and bottom contours are two standard deviations away from the mean. Thus the peak of the sombrero is all the same color because its few points contribute very little to the standard deviation.
To draw the same function in "lin" scale, with edges visible, enter the following code: