is it possible to plot and save figure in console mode?

using the plot function in -nodisplay mode is possible without error or warning? and the plot can be saved in .pgn format?

Antworten (1)

Thorsten
Thorsten am 28 Jun. 2015
x = 1:10; y = x;
h = plot(x, y);
% Save plot in png format using hgsave
hgsave(h, 'sample.png');

2 Kommentare

thanks, but I want to display the plot in case of non-command mode. So it would be nice to work well in both cases.
Thorsten
Thorsten am 29 Jun. 2015
Bearbeitet: Thorsten am 29 Jun. 2015
Add before the plot:
try
figure
catch
% do nothing
end

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 28 Jun. 2015

Bearbeitet:

am 29 Jun. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by