How to keep the numbers on the colorbar scale of a surface plot fixed?

4 views (last 30 days)
Following are my two surface plots (top view). Right now the first graph has colorbar scale from -40 to 40 while the second from -40 to 120. I want the colorbar axes to show the same scale in both, i.e., -40 to 120. Can someone please help? Thanks.

Accepted Answer

Chad Greene
Chad Greene on 20 May 2016
Edited: Chad Greene on 20 May 2016
Set
caxis([-40 120])
after both plots.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!