Contents Previous Next Subchapters Current Chapters-> contour contour2 contour4 contour5 contour6 mesh mesh2 mesh4 mesh5 grotate Parent Chapters-> Omatrix6 graphics fun2var contour Search Tools-> contents reference index search

Contour Plots
 Syntax `contour(`matrix`)` See Also mlmode_contour , surface, mesh , and contour(matrix, levels)

Description
Displays a contour plot of matrix in the current viewport , where matrix has at least two rows and two columns and is integer, real, or double-precision. ``` ```This syntax for `contour` uses the default settings for the arguments levels , x , y , z , and option . The number of contour levels is equal to the number of colors in the current color sequence as returned by gcolor and the levels are evenly spaced between the minimum and maximum value in matrix. The `x`-axis corresponds to the row index of matrix, and the `y`-axis corresponds to the column index of matrix. The contour plane corresponds to `z = 0`, and the contour does not hide lines behind it.

Example
You can use `contour` to plot `z = x y`, where both `x` and `y` range from 1 to 8, by entering ```      x      = seq(8)      y      = x'      matrix = x * y      format int "3"      write("screen", matrix) ``` O-Matrix will respond ```      1   2   3   4   5   6   7   8      2   4   6   8  10  12  14  16      3   6   9  12  15  18  21  24      4   8  12  16  20  24  28  32      5  10  15  20  25  30  35  40      6  12  18  24  30  36  42  48      7  14  21  28  35  42  49  56      8  16  24  32  40  48  56  64 ``` The first line above corresponds to `x = 1` and the last line corresponds to `x = 8`. If you continue the previous example by entering ```      contour(matrix) ``` O-Matrix will generate the following plot. ``` ```