colorbar
Colorbar showing color scale.
📝Syntax
colorbar()
colorbar('off')
colorbar(..., propertyName, propertyValue)
colorbar(target, ...)
colorbar(target, 'off')
c = colorbar(...)
📥Input Arguments
Parameter Description
propertyName a scalar string or row vector character.
propertyValue a value.
target Target: axes.
'off' deletes colorbar associated with the current axes.
📤Output Arguments
Parameter Description
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()
Example illustration
f = figure();
surf(peaks);
axis('square');
colormap('gray');
cb = colorbar(gca);
Example illustration
🔗See Also
colormap
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub