SETCOLORBARLABEL

Purpose:

Set the label of a vertical color bar.

Syntax:

SETCOLORBARLABEL(win, mode, "label")

win

-

Optional. A Window, the target Window of the colormap. Defaults to the current Window.

mode

-

Optional. An Integer, the label display mode.

0:

do not display the colorbar label

1:

display the colorbar label (default)

"label"

-

Optional. A string, the colorbar label. Defaults to the Z units of the source data.

Returns:

Nothing, the colorbar label is displayed or removed from the plot.

Examples:

W1: spline2(randn(5), 10);setplottype(3);setzunits("V");colorbar;setcolorbarlabel(1)

 

 

 

W1 contains a 41x41 array. The array is displayed as an image and the Z units are set to "Volts". A colorbar is added and the label of the colorbar is set to the Z units.

Example:

W1: spline2(randn(5), 10);setplottype(3);colorbar

 

setcolorbarlabel(W1, "Z Force in Newtons");

 

W1 contains an array displayed as an image. A colorbar is added and the label of the colorbar is set to "Z Force in Newtons".

Example:

setcolorbarlabel(W1, 0);

 

Removes the label of a the colorbar in W1 if it exists.

Remarks:

SETCOLORBARLABEL requires that a COLORBAR is present in the target window.

 

Use:

setcolorbarlabel(win, 1, "")

 

to reset the colorbar label display to the Z units of the source data.

See Also:

COLORBAR

FOCUS

GETCOLORBARLABEL

YLABEL