フィルターのクリア

How can I plot a previous plot into a new figure?

2 ビュー (過去 30 日間)
Aman
Aman 2013 年 11 月 20 日
回答済み: Walter Roberson 2013 年 11 月 20 日
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!

回答 (1 件)

Walter Roberson
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.

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by