Way to save figures to .fig file as visible from matlab live script?
조회 수: 11 (최근 30일)
이전 댓글 표시
I have a matlab live script that generates some figures, then uses saveas() to save them to .fig files. The problem is that these figures have "visible" set false by default, so if you double left click to try and open them nothing happens. You have to use openfig() and set visible within openfig.
I tried setting the fig visible before saving via set(gcf, 'Visible', 'on') and this does properly set the property before saving, but this opens a new figure window I have to then close.
Is there a way to programatically export these figures as .fig files with visible set true by default? Without opening a new window.
댓글 수: 0
답변 (1개)
Cedric Kotitschke
2023년 11월 16일
Why don't you set the visible property to 'off' after saving?
set(gcf, 'Visible', 'on')
saveas(gcf, 'figurename.fig')
set(gcf, 'Visible', 'off')
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!