FUNCTION REFERENCE

linkaxes

Synchronize limits of multiple axes.

Synchronize limits of multiple axes.

Syntax

linkaxes(ax)

Syntax

linkaxes(ax, option)

Links the x, y, or both ('x', 'y', 'xy') limits of axes handles in ax, or unlinks with 'off'. Changing limits on one linked axes updates the others.

Example

a1=subplot(2,1,1);a2=subplot(2,1,2);linkaxes([a1 a2],'x');xlim(a1,[0 5])   % xlim(a2) is [0 5]

Differences from MATLAB: Links axes within the same figure; 'z' linking is unsupported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.