MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)

12.07.2015 Views

colorbarPurpose2colorbarDisplay colorbar showing the color scaleSyntaxDescriptioncolorbarcolorbar('vert')colorbar('horiz')colorbar(h)h = colorbar(...)The colorbar function displays the current colormap in the current figure andresizes the current axes to accommodate the colorbar.colorbar updates the most recently created colorbar or, when the current axesdoes not have a colorbar, colorbar adds a new vertical colorbar.colorbar('vert') adds a vertical colorbar to the current axes.colorbar('horiz') adds a horizontal colorbar to the current axes.colorbar(h) places a colorbar in the axes identified by h. The colorbar ishorizontal if the width of the axes is greater than its height, as determined bythe axes Position property.h = colorbar(...) returns a handle to the colorbar, which is an axesgraphics object.Remarkscolorbar works with two-dimensional and three-dimensional plots.2-82

colorbarExamplesDisplay a colorbar beside the axes.surf(peaks(30))colormap coolcolorbar81086426420−20−4−6−8302520151050051015202530−2−4−6See Alsocolormap2-83

colorbarPurpose2colorbarDisplay colorbar showing the color scaleSyntaxDescriptioncolorbarcolorbar('vert')colorbar('horiz')colorbar(h)h = colorbar(...)The colorbar function displays the current colormap in the current figure andresizes the current axes to accommodate the colorbar.colorbar updates the most recently created colorbar or, when the current axesdoes not have a colorbar, colorbar adds a new vertical colorbar.colorbar('vert') adds a vertical colorbar to the current axes.colorbar('horiz') adds a horizontal colorbar to the current axes.colorbar(h) places a colorbar in the axes identified by h. The colorbar ishorizontal if the width of the axes is greater than its height, as determined bythe axes Position property.h = colorbar(...) returns a handle to the colorbar, which is an axesgraphics object.Remarkscolorbar works with two-dimensional and three-dimensional plots.2-82

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!