help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to redirect the plot to a file


From: Ben Abbott
Subject: Re: how to redirect the plot to a file
Date: Fri, 17 Oct 2008 05:20:11 -0400


On Oct 17, 2008, at 4:29 AM, yongjunzheng wrote:

In Octave 3.0.3, using "plot(x,y)" command will render the plot of a X11 window (figure window), then using "print -deps fig.eps" command will print the plot to the file.

But in batch mode, I do not want to plot in the X11 window, I just want to plot to a file directly, how can I get this?

Thank you very much.

If you use a script, the plot will not be produced until it ends or a drawnow is executed. So if you make the figure invisible, before the script ends or your print if, nothing will be displayed.

figure (1);
set (gcf, "visible", "off")
sombrero;
print (gcf, "-dpdf", "my_hat.pdf")
close (gcf)

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]