Plotting figures using figure handles

조회 수: 7 (최근 30일)
jack
jack 2015년 9월 8일
댓글: dpb 2015년 9월 9일
hello guys, i need your help in solving the following problem: i have an open figure and i have done the following:
fig = gcf;
now i have closed the figure and i want to plot what is inside fig. Is this possible without saving the figure in .fig file? If yes then how can it be done?
Thanks in advance.

채택된 답변

dpb
dpb 2015년 9월 8일
Once it's closed, it's gone and the handle, despite the variable still holding the value, is bogus.
Only replotting from the raw data or, as you say, saving to a file will preserve it for posterity.
  댓글 수: 1
dpb
dpb 2015년 9월 9일
I suppose an enhancement request could be made for a handle to become a full-fledged "deep" copy but I doubt it would be considered. An alternative would be an encapsulated function that does such automagically that can be done with effort via findobj and copyobj

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by