Matlab R2016a MLX generated figure no response

3 visualizaciones (últimos 30 días)
Ming Hu
Ming Hu el 21 de Abr. de 2016
Comentada: Ming Hu el 9 de Mayo de 2016
Hi, I am using Matlab R2016a live script to generate and save some figures. The figures were generated and shown in the live script. They were also saved as .fig file. But when i double clicked them, nothing happens. I wonder if there is something wrong with my installation.
Best, Ming

Respuesta aceptada

Matt Cohen
Matt Cohen el 9 de Mayo de 2016
Hi Ming,
This issue is likely related to a default setting made by the Live Editor when working with figures. The figure is probably not being displayed here because it is loaded invisible. When you use live scripts, the 'Visible' property of the figure is set to off because the preview that you see on the right is just a screenshot rather that a docked figure.
To make the figure visible, you would have to set the figure's 'Visible' property to on. You can do this using one of the following two code snippets:
% Assuming variable 'filename' contains the figure's name
f = openfig(filename)
f.Visible = 'on'
or
openfig(filename,'visible')
I hope this helps.
Matt
  1 comentario
Ming Hu
Ming Hu el 9 de Mayo de 2016
Thanks, Matt. That solved the mystery.
Now, i just need to set the 'visible' on first before saving the figure and then set it off in order to show it in the side panel of the live script.

Iniciar sesión para comentar.

Más respuestas (1)

Nikhil Vyas
Nikhil Vyas el 25 de Abr. de 2016
It might be possible that the *.fig extension files are not associated with MATLAB. You can change file association in Windows by the following procedure:
Right click the file > Properties > General > Opens With > Change > Select MATLAB.
Additionally, you can try opening the .fig file inside MATLAB using the following command:
openfig('filename.fig');
In case your file is not in your workspace path, you can copy it there. Or you can use an absolute filename like:
openfig('D:\some_folder\some_other_folder\filename.fig');

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by