MATLAB: How to use same color range on subimages

colormapsubimagesubplot

Hi, I want, that my all subimages have the same colour range. I´m using caxis command but it doesn´t work. Can you help me? I'm lost. (sorry for my english)
bottom = min(min(min(mmin1,mmin2),mmin3),mmin4);
top = max(max(max(mmax1,mmax2),mmax3),mmax4);
subplot(3,2,1+2)
subimage(imresize(imag,20),colormap(jet));
axis off
caxis manual
caxis([bottom top]);
colorbar;
subplot(3,2,2+2)
subimage(imresize(imag,20),colormap(jet)),
axis off
caxis manual
caxis([bottom,top]);
colorbar;

Best Answer

Not sure what you're asking about. If you just display a bunch of grayscale images and then apply a colormap, it has all images use the same colormap so that the same gray scale intensities are mapped to the same colors. In R2014b you can change that and have different colormaps with different axes. What version do you have and why aren't all your images having the same color map now? They should have, unless you're using R2014b and specifically went to the trouble to make then not use the same colormaps.