DADiSP Worksheet Functions > Function Categories > Colors > COLORBAR
Adds a vertical color bar to a Window.
COLORBAR(win, fullscale)
win |
- |
Optional. A Window to obtain colormap. Defaults to the current Window or the system colormap if the current Window is empty. |
||||
fullscale |
- |
Optional. An Integer, the color scale mode.
|
Overlays a vertical colorbar to the right of the current Window.
(x, y) = fxyvals(-1, 1, 0.1, -1, 1, 0.1)
W1: cos(x*y);setplotstyle(0);setplottype(4)
W2: 2*W1;rainbow;colorbar
W2 contains a shaded 3D surface. A vertical color bar scaled to the values of W2 is overlayed onto W2.
setcrange(0, 2)
W3: W1;colorbar(1)
W4: W1;colorbar(0)
The color range is now scaled to Z values from 0.0 to 2.0. The colorbar added in W3 shows the full color range while the colorbar of W4 is scaled to the values of W4.
The colorbar is an overlay. Use the FOCUS command to directly manipulate the colorbar and UNOVERPLOT to remove the colorbar.
See SETCOLORBARLABEL to set the label for the colorbar.