Contents Previous Next Subchapters

Specifying Line Color In Mesh And Surface Plots
Syntax    mesh(zcolor option)
zcolor option)
See Also glevel , gcolor , mesh(z) and mesh(z, color option, x, y)

Displays the mesh or surface plot specified by z and color option, in the current viewport , where color option is one of the colors listed in gcolor or it is equal to "levels". If it is a color, the lines in the resulting plot have the specified color. If it is "levels", the lines in the resulting plot change color in the manner specified by the glevel function.

If you enter
     x = -5. : 1. : 5.
     y = x'
     z = x * y / 10.
     glevel({-1.2, -.6, .6, 1.2})
     gcolor({"red", "green", "black", "lime", "blue"})
     surface(z, "levels")
O-Matrix will generate a surface plot with red where z < -1.2, green where -1.2 < z < -.6, black where -.6 < z < .6, lime where .6 < z < 1.2, and blue where 1.2 < z .