help-octave
[Top][All Lists]
Advanced

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

Re: Plotting data into file


From: Michael Creel
Subject: Re: Plotting data into file
Date: Tue, 14 Jun 2005 09:45:42 +0200
User-agent: KMail/1.8

On Monday 13 June 2005 16:57, Michael Kopp wrote:
> Hi all,
>
> I am about writing a script which automatically plots data into
> eps-files. I am using "gset outpout <filename>" to designate the output
> file. However, this seems to work only if I give the name ouf the
> outputfile directly as a string, but not if I give it as an octave
> string variable. Here is an example:
>
> str = "test.eps";
> gset terminal postscript eps;
> gset output str;              % this does not work
> plot((1:10)', (1:10)'/2);
> gset output "anothertest.eps";        % this works
> plot((1:10)', (1:10)'/2);
> gset terminal X11;
> gset output;
>
> Any suggestions?
>
> TIA,
>
> Michael.
>

A possibility using print() from octave-forge is
outfile="myoutfile.eps";
plot(rand(10,1));
print(outfile, "-depsc2");

M.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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