Is it possible to save a figure when MATLAB is running with "-nodisplay" option?
7 views (last 30 days)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Commented: David
on 12 Dec 2013
I have MATLAB running with "-nodisplay" flag and I have created a figure which is not displayed.
I start MATLAB without display by using the following command in the Linux terminal window:
matlab -nodisplay
I create figure by using the following command in MATLAB Command Window:
plot(1:10)
This figure is not displayed. Can I save it to a file in FIG or other format nevertheless?
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
It is possible to save a figure even if it is not displayed. You can use the commands HGSAVE or PRINT to save the figures to a particular format, using GCF or other figure handle. For example,
hgsave('filename')
hgsave(h,'filename')
1 Comment
David
on 12 Dec 2013
What if I tried this and when I attempt to reload the figure it says:
Error using ==> open at 162
There is no 'WindowStyle' property in the 'contourgroup' class.
More Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!