28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2linkaxes<br />

Purpose Synchronize limits of specified axes<br />

Syntax linkaxes<br />

linkaxes(axes_handles)<br />

linkaxes(axes_handles,'options)<br />

linkaxes<br />

Description Use linkaxes to synchronize the individual axis limits on different subplots<br />

within a figure. This is useful when you want to zoom or pan in one subplot and<br />

display the same range of data in another subplot. linkaxes operates on 2-D<br />

plots.<br />

linkaxes links the x- and y-axis limits of all axes (i.e., all subplots) in the<br />

current figure.<br />

linkaxes(axes_handles) links the x- and y-axis limits of the axes specified in<br />

axes_handles.<br />

linkaxes(axes_handles,'option') links the axes specified in axes_handles<br />

according to the specified option. The option argument can be one of the<br />

following strings:<br />

x — Link x-axes only<br />

y — Link y-axes only<br />

xy — Link x- and y-axes<br />

off — Remove linking<br />

See the linkprop function for more advanced capabilities enabling you to link<br />

object properties on any graphics objects.<br />

Examples This example creates two subplots and links the x-axis limits of the two axes.<br />

You can use interactive zooming or panning (selected from the figure toolbar)<br />

to see the effect of axes linking. For example, pan in one graph and notice how<br />

the x-axis also changes in the other.<br />

ax(1) = subplot(2,2,1);<br />

plot(rand(1,10)*10,'Parent',ax(1));<br />

ax(2) = subplot(2,2,2);<br />

plot(rand(1,10)*100,'Parent',ax(2));<br />

linkaxes(ax,'x');<br />

2-1347

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!