colorbar
Add a color-scale legend to the figure.
Syntax
Section titled “Syntax”h = colorbarh = colorbar(side, ...)Description
Section titled “Description”Adds a vertical colorbar showing the mapping from data values to colors. Optional side is a string: 'east' (right, default), 'west', 'north', 'south'. Trailing name-value pairs control colorbar properties.
Examples
Section titled “Examples”surf(peaks(50)); colorbarcolorbar('south')See also
Section titled “See also”legend— Add a legend to the chart.