MATLAB Function Reference Previous page   Next Page
linkaxes

Synchronize limits of specified 2-D axes

Syntax

Description

Use linkaxes to synchronize the individual axis limits on different subplots within a figure. Calling linkaxes will make all input axis have identical limits. This is useful when you want to zoom or pan in one subplot and display the same range of data in another subplot.

linkaxes(axes_handles) links the x- and y-axis limits of the axes specified in the vector axes_handles.

linkaxes(axes_handles,'option') Links the axes axes_handles according to the specified option. The option argument can be one of the following strings:

See the linkprop function for more advanced capabilities that allows linking object properties on any graphics object.

Example

This example creates two subplots and links the x-axis limits of the two axes. You can use interactive zooming or panning (selected from the figure toolbar) to see the effect of axes linking. For example, pan in one graph and notice how the x-axis also changes in the other.

See Also

linkprop, zoom, pan


Previous page  LineSpec linkprop Next page

© 1994-2005 The MathWorks, Inc.