MATLAB Answers

.fig file opens in non-editable way

6 views (last 30 days)
Steeven
Steeven on 1 Mar 2018
Commented: Qi Tan on 11 Jul 2021 at 13:33
I have a simple script that plots some data. The plots are shown on the screen as by default and I use the saveas function to save them as .fig files as well.
This works fine, although when I double-click the .fig-files, they are not shown. I read that this is due to them being set to invisible.
I therefore use this line in the top of my document to make everything visible:
set(0,'DefaultFigureVisible','on')
This works! The graphs are showing as always while the script is running, and the saved .fig-files can now be opened.
But... they are now in an un-editable format. I can only view them but not edit them because the menu in the top of the figure window has disappeared! See the difference on the below images. How can I get it back so I can save the graphs for later edit?

Answers (1)

Jan
Jan on 1 Mar 2018
set(gcf, 'Menubar', 'figure', 'Toolbar', 'figure')
  2 Comments
Qi Tan
Qi Tan on 11 Jul 2021 at 13:33
hi, I offer one possible situation, I met today: savefig in the live script... Thank you for your solution!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!