MATLAB: How to change colormaps for different figures in single plot

colorbarcolormap

I want to change colormap for all three figures. When I used caxis, the colormap of the last figure is changing but not the others. Could anyone suggest a way to do this?untitled1.jpg

Best Answer

You can set the target as first input of the caxis command:
FigH(1) = figure;
FigH(2) = figure;
FigH(3) = figure;
caxis(FigH, 'auto');
Either call caxis 3 times with one figure handle each time, or provide the handles as vector in one caxis call.