Effacer les filtres
Effacer les filtres

Uniformisation of color scale in different subplots with different limits

2 vues (au cours des 30 derniers jours)
Philippe
Philippe le 9 Juil 2012
I have the following plot:
x=(1:10)';
y=(2:2:20)'
for k=1:10
for r=1:10
z1(k,r)=(5*k)+(4*r)+5;
z2(k,r)=(5*k)-(4*r)-5;
end
end
subplot(1,2,1)
surf(x,y,z1)
colorbar
subplot(1,2,2)
surf(x,y,z2)
colorbar
Now, the question is: How do I define a single color bar with unique and common maximum and minimum values (e.g. by fixing the upper and lower limits, as we can do it for the axis)? Thanks for your help and best regards.
  2 commentaires
Luffy
Luffy le 9 Juil 2012
see doc colorbar,on how to set Y Tick Labels.
Teja Muppirala
Teja Muppirala le 10 Juil 2012
As described here, you can use the CAXIS command to manually set the color limits:

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by