FUNCTION REFERENCE

colorbar

Show a colour scale next to the current axes.

Show a colour scale next to the current axes.

Syntax

cb = colorbar

Syntax

cb = colorbar(location)

Syntax

cb = colorbar(ax, 'Location', location)

Syntax

colorbar off

location is eastoutside (vertical, the default) or southoutside (horizontal). The bar shows the axes colormap across its colour limits (see clim). The handle has Limits, Label, Location, Orientation, FontSize and Visible; cb.Label.String sets its label.

Example

plot(1:3); cb = colorbar; cb.Label.String = 'Level'; cb.Limits   % [0 1]

Example

cb = colorbar('southoutside'); cb.Orientation   % 'horizontal'

Differences from MATLAB: Only the eastoutside and southoutside positions. Ticks follow the limits automatically; Ticks and TickLabels cannot be set yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.