Uniformisation of color scale in different subplots with different limits
4 views (last 30 days)
Show older comments
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 Comments
Teja Muppirala
on 10 Jul 2012
As described here, you can use the CAXIS command to manually set the color limits:
Answers (0)
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!