Colorbar is to large in colormapeditor when using imshow
Show older comments
Hi
While working with the Matlab Image Processing Toolbox with MatLab R2012a I recognized a rather strange bug.
When displaying an image using image as plotting function and then opening the color bar editor, everything looks fine, except that the color scaling is not fitting correctly. To avoid this effect I normally use imshow, so that I can give color scale borders. When I open the colormapeditor in this mode the colorbar is way longer than the window, and this is quite cumbersome especially when one wants to adjust the colorbar with the colorflags. Unfortunately I cannot document the bug with pictures, since I don't know how to upload images to mathworks.com.
Is there a possibility to shrink the colorbar in "imshow-mode", so that it fits into the window?
Please find below the samplecode hopefully visualizing the problem.
Samplecode
cameraman = imread('cameraman.tif')
% Plot image with colortable
% first use of image()
figure;
image(cameraman)
axis equal
axis tight
colormapeditor
% first use imshow() with colorscaling
figure;
imshow(cameraman,[])
colormap('jet')
colormapeditor
Any help is appreciated
Thanks
Dominic
Accepted Answer
More Answers (1)
Dominic
on 8 May 2013
0 votes
Categories
Find more on Blue in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!