CONTOUR command

Syntax: CONTOUR { x y } z nctr { min { incr }}
CONTOUR\SPECIFIC { x y } z lvls
Qualifiers: \SPECIFIC, \POLAR, \LEGEND, \COLORS, \LINETYPES, \LINEWIDTHS, \PARTIAL, \RESET, \BORDER, \AXES, \CONTINUE
Defaults: X=[1;2;3;…], y=[1;2;3;…], \-SPECIFIC, \-POLAR, \-LEGEND, \-COLORS, \-LINETYPES, \-LINEWIDTHS, \-PARTIAL, \-RESET,\BORDER, \AXES, \-CONTINUE
Examples: CONTOUR X Y Z 10
CONTOUR M 10 MINVAL
CONTOUR\SPECIFIC X Y M LEVELS

The CONTOUR command draws contour lines for data contained in a regular matrix. If you instead have a scattered set of points contained in three vectors, first create a regular matrix from the data using the GRID command.

Suppose that z is a matrix which has n columns and m rows. The vectors x and y are optional, and if entered, are used for scaling the axes. Each matrix element, z[i,j], is associated with the coordinates (x[j],y[i]). The length of x must be greater than or equal to n and the length of y must be greater than or equal to m.

If x and y are not entered, x defaults to the set [1;2;3;...;n], and y defaults to the set [1;2;3;...;m], so that matrix element z[i,j] is associated with the coordinates (j,i).

Polar coordinates

By default, the vectors x and y are assumed to represent Cartesian coordinates. If the \POLAR qualifier is used, x and y are assumed to represent polar coordinates, with x the radial component and y the angular component, in degrees. The values are converted internally to rectangular coordinates, and the vectors are returned unchanged.

Matrix boundary

By default, the boundary of the matrix is outlined within the axes. If this boundary is not desired, use the \-BORDER qualifier.

Add more contours

To add more contours to an existing contour plot, re-issue the contour command with the \CONTINUE qualifier. If a legend is being drawn, it will be continued from where it left off. You must have used the \-RESET qualifier on the previous CONTOUR command if you intend to use \CONTINUE on a succeeding CONTOUR command.

Contour level selection
Contour line properties
Legend
Axes
Examples