Reopen figure after closing it

144 visualizaciones (últimos 30 días)
Abilash Subbaraman
Abilash Subbaraman el 19 de Oct. de 2016
Respondida: heinet el 28 de En. de 2020
I was running a long simulation and the result a plot and a figure was created. I accidentally closed the figure. Is there anyway to make the figure reappear?

Respuesta aceptada

Image Analyst
Image Analyst el 19 de Oct. de 2016
Yes. Run the long simulation again.
  2 comentarios
heinet
heinet el 30 de Abr. de 2018
An accurate yet harsh answer.
Rik
Rik el 27 de Jun. de 2019
Maybe you could do something forensic to read the previous state of the RAM, which might be used to restore the figure and its contents.
But usually re-running the simulation will be a much better solution. (and include a save call to store the inputs and the results in your code)

Iniciar sesión para comentar.

Más respuestas (4)

Gottfried Langhans
Gottfried Langhans el 20 de Ag. de 2018
As all your data you are plotting is still in the workspace you can just copy the lines which are creating your plot out of the script into the command window and press enter. It should take the Data from your workspace and plot it again very fast, as the solution of your simulation is not the figure itself but saved as vectors (or whatever youre plotting) in the workspace. Hope this still helps, worked for me ;)
  1 comentario
Adam
Adam el 20 de Ag. de 2018
Depends if it was run in a script or a function!

Iniciar sesión para comentar.


Maha
Maha el 28 de En. de 2020
It would be a great tool, like the unplot function when you do a mistake, the reopenlastfigure would be great

heinet
heinet el 28 de En. de 2020
I have come to a working solution for myself. I save the whole environment as a ".mat"---either at console or in my script where neaded. Then, make your plotting scripts either separate cells (sections) you can execute again with ctrl+enter, or make them separate functions or scripts you can run against your saved environment variables. This at least saves you from having to run run a long simulation all over.

Sivabalan Selvarajan
Sivabalan Selvarajan el 15 de Ag. de 2019
You can copy the complete code into a script window and run it, the plots will be avilable on the right side of your script window after you run it, even after closing the figure window. You could reopen it anytime.
  1 comentario
Walter Roberson
Walter Roberson el 15 de Ag. de 2019
I suspect this only applies for Live Script.

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by