| Image Processing Toolbox | Search  Help Desk |
| colorbar | Examples |
Syntax
colorbar('vert')
colorbar('horiz')
colorbar(h)
colorbar
h = colorbar(...)
Description
colorbar('vert') appends a vertical colorbar to the current axes, resizing the axes to make room for the colorbar. colorbar works with both two-dimensional and three-dimensional plots.
colorbar('horiz') appends a horizontal colorbar to the current axes.
colorbar(h) places the colorbar in the axes h. The colorbar is horizontal if the width of the axes is greater than its height.
colorbar with no arguments adds a new vertical colorbar or updates an existing one.
h = colorbar(...) returns a handle to the colorbar axes.
Remarks
colorbar is a function in MATLAB.
Examples
Display a colorbar to view values for a filtered image.I = imread('blood1.tif');
h = fspecial('log');
I2 = filter2(h,I);
imshow(I2,[]), colormap(jet(64)), colorbar
