How can I save a plot to a variable to be printed later? I'm more specifically referring to problems of plots which involve many different legends/ figure objects such as ones created by looping over a hold on command.
조회 수: 18 (최근 30일)
이전 댓글 표시
I've got to do this thing for uni where I loop over a bunch of objects and plot their calculated divergences. They (32 different classes) are all calculated individually, then have a bar plot printed and then are looped over to plot the whole lot sequentially. I need to then plot a separate plot with specific axes and then am further going to do this again.
This computation can take quite a few minutes each time, so it seems so dumb that I have to run it like 5 times every time I need to change one thing, when each of these 5 plots will be plotting the exact same data.
댓글 수: 0
답변 (1개)
Rajani Mishra
2020년 4월 13일
To save plot results programmatically use “saveas() function”. Read its documentation below:
Also I came across similar question, find it's here: https://www.mathworks.com/matlabcentral/answers/68364-how-to-save-a-figure-through-each-run-of-a-for-loop
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!