We have a gui which plots a graph and then add some points to it depending on the user input. We want to automate the process and run it several times on a server and produce jpeg images. This is an extremely simplified code (but actually except for the choice of data, its exactly the same):
function _something_()
x = linspace(0,2*pi,100);
plot(x,sin(x))
hold on
scatter(x,cos(x))
hold off
end
Is there a way to achieve this ? Maybe we should use something else and not "plot" and "scatter" ?
Thanks !

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 13 Aug. 2015

0 Stimmen

See print() and saveas(). See also the File Exchange contribution export_fig (I am not sure if it has been updated for R2014b and later though.)

1 Kommentar

uido
uido am 13 Aug. 2015
Was so sure that I cannot use fig and plot and all that without a graphical front end, that I did not even check. learned my lesson.
saveas() does exactly what i need.
Thanks !

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 13 Aug. 2015

Kommentiert:

am 13 Aug. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by