save animation in subplot
1 回表示 (過去 30 日間)
古いコメントを表示
feynman feynman
2024 年 8 月 15 日
コメント済み: feynman feynman
2024 年 11 月 25 日
I'm using
while
drawnow;hold off
end
to create an animation. But this animation is just the 6th position as in subplot(2,3,6) (or through next tile repeatedly). To save this animation to the computer while not keeping the other subplots 1~5, what to do?
2 件のコメント
Walter Roberson
2024 年 8 月 16 日
??
That is an infinite loop. Inside the infinite loop, you request that the graphics queue be flushed, and you turn off hold . But you do not do anything else -- no drawing at all, no recording of previously drawn material.
It is not clear what you are trying to do?
採用された回答
Walter Roberson
2024 年 8 月 16 日
ax6 = subplot(2,3,6);
count = 0;
while true
%draw something
count = count + 1;
filename = fullfile(SAVEDIRECTORY, "image" + count + ".png");
exportgraphics(ax6, filename);
end
8 件のコメント
Walter Roberson
2024 年 11 月 24 日
subplot24=subplot(2,2,[2;4]);
%...
subplot2=subplot(2,2,2);
subplot24 is expected to be about twice the size of subplot2 . You will have trouble writing both of them to the same video, unless you imresize() to a common size.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Animation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!