Opening a saved fig file in R2014b is very slow when axes are linked
1 次查看(过去 30 天)
显示 更早的评论
Spotted some unusual behaviour recently. If I create a figure with subplots (see below) and linkaxes, save it and then reopen it, it takes approx 15 mins to open the fig, with one processor on my machine being used at 100% for all of that time. The figure opens in about a 1s if linkaxes isn't used. This behaviour isn't seen in older releases (I tried it in 09a). I assume it is a problem with linkaxes but wondered if anyone had a bright idea for a work around (other than ensuring axes aren't linked before saving!)? Linked and unlinked versions of the figure as generated on my machine attached.
Thanks,
Paul.
data=rand(6,10000);
figure
for i=1:6
ax(i) = subplot(6,1,i);
plot(data(i,:))
end
linkaxes(ax)
0 个评论
采纳的回答
Anish Mitra
2016-2-23
It looks like this might have been a reported bug, that has been fixed. You could try and check if the issue still persists in R2015a.
For R2014b, a workaround could be to not link axes before saving, but create a custom script that opens the figure and links the axes.
% Open the figure and save the handle in f
f = openfig('yourfigure.fig');
% Get the children of the figure
c = f.Children;
% This compares the children "type" with "axes" to get the correct indices
idx = strcmp(get(c,'type'),'axes')
% Get these axes from the figure's children
a = c(idx);
% Link the axes
linkaxes(a,'x');
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!