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

colorbar adds a color bar into a plot.

💡 Examples

f = figure();
surf(peaks);
axis('square');
colormap('summer');
colorbar()

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

🔗 See also

colormap.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?