using linkaxes function takes a long time to close figures
Show older comments
When I use the linkaxes command, my figure takes a long time to close the figure (not the plotting part, but closing part). I have 32 plots and it takes a really long time to close all the figures. Is there a way around this?
For example the following code without linkaxes takes 0.034sec but with it takes 7.628sec. I am using MATLAB R2013a Desktop PC Win7 Ultimate. i7-3770 CPU with 16GB RAM. Same PC matlab R2017b without linkaxes takes 0.0586 sec and with linkaxes takes 1.16sec.
My friend's PC on 2016b takes 0.047sec wihtout linkaxes and 0.875sec with it. So I understand, the 7sec may either be unique to me or the version of matlab. However, is there a way around the linkaxes or close commands so it doesn't take 10 times longer even on my friend's PC? Thanks
clear; close all; clc;
f1=figure;
for ii = 1:36
ax(ii)=subplot(6,6,ii);
plot(rand(100,1),rand(100,2),'Color',[0.5 0.2 1],'LineWidth',3)
yL = get(gca,'YLim'); line([0.5 0.5],yL,'Color','k','LineWidth',1.5);
end
linkaxes([ax],'x');
tic; close; toc;
Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!