why are fig files opening invisible?

63 ビュー (過去 30 日間)
Daniel Vieira
Daniel Vieira 2023 年 8 月 18 日
コメント済み: Nicole009 2024 年 2 月 13 日
a few days ago matlab started opening figures from fig files with the Visible flag 'off'. After I figured what was happening it's just a matter of setting it to 'on' to see the figure, but why it suddenly started doing it? how do I revert to the normal behavior?

回答 (1 件)

ProblemSolver
ProblemSolver 2023 年 8 月 18 日
There could be a few reasons why MATLAB started opening figures with the Visible property set to 'off' by default:
  1. You may have accidentally set the default figure Visible property to 'off'. This can be done via:
set(0,'DefaultFigureVisible','off')
To revert this, simply set it back to 'on':
set(0,'DefaultFigureVisible','on')
  1. If you are opening figures programmatically (e.g. with openfig), the Visible property defaults to 'off'. You need to explicitly set it to 'on':
h = openfig('figure.fig');
set(h,'Visible','on')
  1. You may have some startup code or script that is preemptively setting the DefaultFigureVisible to 'off'. Check your MATLAB startup folder and scripts.
  2. There could be an issue with your MATLAB installation or preferences where it is defaulting figures to invisible for some reason. Try resetting preferences or reinstalling as a last resort.
  8 件のコメント
Walter Roberson
Walter Roberson 2024 年 2 月 8 日
I want to open invisible figures. I want to be able to configure the settings of the figure and then open it; that is a lot more efficient than opening it visible and then configuring the settings.
Nicole009
Nicole009 2024 年 2 月 13 日
I'm only saving .figs so I can point someone else to that directory and they can open and place markers and see it. I don't save figs for later MATLAB use. It doesn't help when they open it and they're invisible. It's a bug - that should not be the default implementation. If you want to programmatically override default behavior, that's fine. But the 90% use case should be default.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by