Link All Axes in Figure

版本 1.0.0.0 (1.3 KB) 作者: Dan K
This is just a simple utility function to find all subplots in a figure and link their axes.
613.0 次下载
更新时间 2012/1/6

查看许可证

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')

引用格式

Dan K (2025). Link All Axes in Figure (https://www.mathworks.com/matlabcentral/fileexchange/34476-link-all-axes-in-figure), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Subplots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0