help-octave
[Top][All Lists]
Advanced

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

RE: printeps error question


From: Hall, Benjamin
Subject: RE: printeps error question
Date: Wed, 8 Dec 2004 10:44:02 -0500

You must include the filename in "quotes", e.g.

printeps("sin")


-----Original Message-----
From: John B. Thoo [mailto:address@hidden
Sent: Wednesday, December 08, 2004 10:26 AM
To: octave help mailing list
Subject: printeps error question


Hi.  I have a printing script provided by AS Hodel that used to work 
fabulously for me, but now, after not having used it in a while, gives 
an error.

The script is:

function printeps(filename)
% function printeps(filename)
% replot screen plot to a file
% inputs:
%   filename: string:
% no argument checking done - this means YOU mark!

   gset terminal postscript eps color
   eval(sprintf("gset output '%s'", filename));
   replot
   #gset terminal x11
   closeplot
endfunction


but this is what I get:

octave:1> t = -1:0.01:1;
octave:2> plot (t, sin (t))
octave:3> printeps (sin)
error: sin: too few arguments
error: evaluating argument list element number 1
octave:3>

What am I doing wrong?

TIA.
---John.



-------------------------------------------------------------
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
-------------------------------------------------------------



-------------------------------------------------------------
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]