How can I plot a previous plot into a new figure?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a for loop that is plotting Temperature against Fuel-Mass Percent. The temperature values are being read from text files. Each time a text file is read the previous temperature matrix is erased. I plotted the first set of Temperature values in figure 1 and the second set of Temperature values in figure 2, but now I need to plot the second set of Temperature plot with Temperature sets 3,4, and 5. How can I store the second figure and add it to my third figure which contains plots 3,4, and 5? Thank you for the help!
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 11월 20일
Well...
figure2 = 2; %you said "figure 2" so I assume its numeric handle is 2.
figure3 = 3; %you said "figure 3" so I assume its numeric handle is 3.
ax2 = findobj(figure2, 'type', 'axes');
ax3 = findobj(figure3, 'type', 'axes');
copyobj(get(ax2, 'Children'), ax3);
But really, easier is to just keep a copy of the data and plot() it along with the other data.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!