pcpuck
Electrical
- May 16, 2003
- 1
I would like to use different colormaps in different subplots. This simple example doesn't seem to work:
%%%%%%%%%%%%%%%%%%%%%%%
P=peaks(40);
C=del2(P);
subplot(1,2,1)
surf(P,C)
colormap white
colorbar
subplot(1,2,2)
surf(P,C)
colormap hot
colorbar
%%%%%%%%%%%%%%%%%%%%%%%%
Matlab always uses the last defined colormap, but I would like to use a different one for each subplot.
Can anyone help, please.
/Peter
%%%%%%%%%%%%%%%%%%%%%%%
P=peaks(40);
C=del2(P);
subplot(1,2,1)
surf(P,C)
colormap white
colorbar
subplot(1,2,2)
surf(P,C)
colormap hot
colorbar
%%%%%%%%%%%%%%%%%%%%%%%%
Matlab always uses the last defined colormap, but I would like to use a different one for each subplot.
Can anyone help, please.
/Peter