File Exchange

image thumbnail

Link All Axes in Figure

version 1.0 (1.34 KB) by

This is just a simple utility function to find all subplots in a figure and link their axes.

0 Downloads

Updated

View License

Syntax is the same as linkaxes, except without passing in the handles to the axes to link. It replaces:
figure;
ax(1) = subplot(2,1,1);
plot(rand(10,1));
ax(2) = subplot(2,1,2);
plot(1:10);
linkaxes(ax,'x')
clear ax

with:
figure;
subplot(2,1,1);
plot(rand(10,1));
subplot(2,1,2);
plot(1:10);
linkaxesInFigure('x')

Comments and Ratings (2)

Frank Drop

Works as promised, saves a bit of typing. Super.

pietro

pietro (view profile)

MATLAB Release
MATLAB 7.13 (R2011b)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video