From: Raphael J on
Hi,
I would like to show 2 different sequences of images in two axes. The images in one axes should have the color gray, the other images jet.
But when I try to show images in the 2nd axes in jet, the color of the first axes change from gray to jet.

I use:
axes(handles.axes_VIS)
imshow(imread(fullfile(v_path,v_data(1+delta).name)),gray(2^8));
and...
axes(handles.axes_NIR)
imshow(imread(fullfile(n_path,n_data(1+delta).name)), jet(2^12));

Does anyone has an idea what I can do?

Thanks a lot!
From: Rob Campbell on
You can only use one colormap per figure. You can think of the colormap as converting a gray-scale image to pseudo-colour. The alternative is to make color images using the color map of your choice. I have a function on the FEX which does what you want, check out the example image.
www.mathworks.com/matlabcentral/fileexchange/26322-mat2im

The only catch is that if you want a color-bar then you'll have to make it yourself. i.e. define new axis, plot the appropriate data, and set the y axis scale as desired.
From: us on
"Raphael J" <raphael.jenski(a)rwth-aachen.de> wrote in message <hvak5p$kuo$1(a)fred.mathworks.com>...
> Hi,
> I would like to show 2 different sequences of images in two axes. The images in one axes should have the color gray, the other images jet.
> But when I try to show images in the 2nd axes in jet, the color of the first axes change from gray to jet.
>
> I use:
> axes(handles.axes_VIS)
> imshow(imread(fullfile(v_path,v_data(1+delta).name)),gray(2^8));
> and...
> axes(handles.axes_NIR)
> imshow(imread(fullfile(n_path,n_data(1+delta).name)), jet(2^12));
>
> Does anyone has an idea what I can do?
>
> Thanks a lot!

a hint:

http://www.mathworks.com/support/tech-notes/1200/1215.html

us
From: Raphael J on
Thank you both!
Very fast response!