colorbar

Colorbar showing color scale.

Syntax

  • colorbar()

  • colorbar('off')

  • colorbar(..., propertyName, propertyValue)

  • colorbar(target, ...)

  • colorbar(target, 'off')

  • c = colorbar(...)

Input argument

  • propertyName - a scalar string or row vector character.

  • propertyValue - a value.

  • target - Target: axes.

  • 'off' - deletes colorbar associated with the current axes.

Output argument

  • c - graphics object: axes on color bar.

Description

colorbaradds a color bar into a plot.

Examples

f = figure();
surf(peaks);
colormap('summer');
colorbar()
f = figure();
surf(peaks);
colormap('gray');
cb = colorbar(gca);

See also

colormap.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated