Draws a contour plot from data stored in an array.
x A 1D or 2D array containing values of the first independent variable. If z is 1D, then x is a required 1D input variable with the same number of elements as z. If z is 2D, then x is an optional 1D or 2D input.
y A 1D or 2D array containing values of the second independent variable. If z is 1D, then y is a required 1D input variable with the same number of elements as z. If z is 2D, then y is an optional 1D or 2D input.
Fill Fills contour intervals with color. This keyword can have the following values:
NOTE: If Fill is specified, labeling is disabled. See Example 2 for information on creating a filled contour plot with labels.
MIN(m,n)/3.5
. If z is a 1D array of length m, the default Frequency value is: SQRT(m)/3.5
.Label_style An integer specifying the contour label fill style. Possible values are:
For scattered data z, x, and y are 1D arrays of the same length.
For gridded data z is a 2D (m by n) array, while x and y can be 2D, 1D, or undefined. If x and y are 2D then they are of dimensions m by n, and z(i,j) corresponds to the point ( x(i,j), y(i,j) ). If x and y are 1D then they are of lengths m and n respectively, and z(i,j) corresponds to the point ( x(i), y(j) ). If x and y are undefined then they default to x = FINDGEN(m) and y = FINDGEN(n).
seed0=0 & seed1=2 & seed2=5 z = RANDOMU(seed0, 20) x = RANDOMU(seed1, 20) y = RANDOMU(seed2, 20) CONTOUR2, z, x, y, Nlevels=10, /XStyle, /YStyle
Figure 2-17 Randomly scattered data is contoured.
TEK_COLOR
z = DIST(5) colorindex=[20, 21, 22] CONTOUR2, z, /XStyle, /YStyle, NLevels=5, Fill=2, $ C_Fillcolors=colorindex
CONTOUR2, z, /XStyle, /YStyle, NLevels=5, Label_style=3, $ /NoErase, C_Colors=0, C_Fillcolors=colorindex, $ C_Charsize=1, C_Charthick=1
Figure 2-18 Contour plot with contour labels and fill color.
For more information on contour plots, see the PV-WAVE User's Guide.