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!