Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Linkaxes query and axis scaling

$
0
0
Hello - I have a series of 8 subplots. Each of the subplots are surface plots, over an area of 1000 x 1000 with varying intensity. I want to plot them all with the same axis, rather than their own relative ideal axis. So basically, if the highest intensity of any of them was 10^15, I'd want them all to extend to 10^15.

I use code like this;

figure(1)
h1 = subplot(4,2,1)
h1s = surf(P5)
set(h1s, 'edgecolor','none')
h2 = subplot(4,2,2)
h2s = surf(P10)
set(h2s, 'edgecolor','none')
h3 = subplot(4,2,3)
h3s = surf(P15)
set(h3s, 'edgecolor','none')
h4 = subplot(4,2,4)
h4s = surf(P20)
set(h4s, 'edgecolor','none')
h5 = subplot(4,2,5)
h5s = surf(P25)
set(h5s, 'edgecolor','none')
h6 = subplot(4,2,6)
h6s = surf(P30)
set(h6s, 'edgecolor','none')
h7 = subplot(4,2,7)
h7s = surf(P35)
set(h7s, 'edgecolor','none')
h8 = subplot(4,2,8)
h8s = surf(P40)
set(h8s, 'edgecolor','none')
pause(3)
linkaxes([h1 h2 h3 h4 h5 h6 h7 h8],'xy');

However, when I use it, it displays them all as relative only to themselves and produces the error "Warning: linkaxes requires 2-D axes as input. Use linkprop for generic property linking. "

Any ideas on what I may be doing wrong ?

Also, it is possible to have a single colorbar for all the plots, or at least scale them all the same ?

Thanks!

Viewing all articles
Browse latest Browse all 19628

Trending Articles