フィルターのクリア

Uniformisation of color scale in different subplots with different limits

2 ビュー (過去 30 日間)
Philippe
Philippe 2012 年 7 月 9 日
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 件のコメント
Luffy
Luffy 2012 年 7 月 9 日
see doc colorbar,on how to set Y Tick Labels.
Teja Muppirala
Teja Muppirala 2012 年 7 月 10 日
As described here, you can use the CAXIS command to manually set the color limits:

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by