Hi, I would like to plot the colorbar of an image not next to my image, but in a seperate figur window. Therefore the colorbar should even be plotted in the size of an image.
I am looking for something like this:
min_val=min(example_img(:)); max_val=max(example_img(:));figure(1),imshow(example_img,[min_val max_val]); %show the image, but without colorbar
h=colorbar %do something to prevent showing the colorbar in figure(1)
colorbar_img=get_colorbar_img(h) %do something to get an image that shows the %colorbar and has the same size as example_img
figure(2)imshow(colorbar)
thanks for you help!
Best Answer