[Top][All Lists]

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

Re: "gset output 'filename'" question

From: Ben Sapp
Subject: Re: "gset output 'filename'" question
Date: Tue, 5 Mar 2002 09:48:58 +0700

Something similar to this will work: 

octave:1> sombrero(50)
octave:2> filename = ""
filename =
octave:3> gset terminal postscript enhanced color
octave:4> eval(sprintf("gset output \"%s\"",filename))
octave:5> replot

Now, you can view with a postscript viewer.   

On Tuesday 05 March 2002 10:19 pm, Davide Cavallari wrote:
> Is it  somehow possible  to pass  a string variable  to the  "gset output"
> command? I wrote  an octave script to plot  a graph in a file  and I would
> like to pass that  file's name as an command line  argument of the script.
> But if I try e.g.
> filename = ""
> the command
> gset output filename
> complains because it wants a literal, as in
> gset output ''
> What can I do?

Ben Sapp                         Los Alamos National Laboratory
email: <mailto:address@hidden>   Phone: (505)667-3277
Fax:   (505)665-7920             URL:

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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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