[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gset output-command
From: |
Michel |
Subject: |
gset output-command |
Date: |
Thu, 08 Jan 2004 15:24:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
Hey,
I'm trying to write a simple m-file with wich I can save plots (also if
I rotated them). It works, but I can't seem
to use a string-variable for teh file-name?? Can't I specify a variable?
Is it just passed on to gnuplot?
gset output filename
It's not good code :), but here it is:
#saveplot saves the last plot in the current directory with filename
"filename"
# in postscript-format
function saveplot
graw("save \'.plot.current\';")
gset terminal postscript
gset output "plot.ps"
graw("load \'.plot.current\';")
gshow
gset terminal x11
endfunction
If somebody wants to enhance it ..be my guest. I'll maybe do it while
I'm using it. thinking of creating tempfile or maybe none at all and
specifyinh the output-format and specifying the filename as a parameter!!!
I think it also saves multiple plots ... so this is not rerally correct
to, but it works enough for me at the moment...
-------------------------------------------------------------
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
-------------------------------------------------------------
- gset output-command,
Michel <=