|
From: Jonathan T. <jt...@as...> - 2011-10-22 17:08:53
|
On Sat, 22 Oct 2011, Ethan Merritt wrote:
> But this assumes that you re-open the terminal driver before
> every plot. That hasn't been my practice in the past, and I
> suspect I'm not the only one with gnuplot scripts in daily
> use that don't do this. The generic usage up until now has
> been as below, and again I point to the demo scripts, not
> because they are important per se but just because they
> illustrate the scripting style.
>
> set term foo
>
> set output 'plot1.foo'
> set title "Graphs AB"
> plot "A.dat" title "A", "B.dat" title "B"
>
> set output 'plot2.foo'
> set title "Graphs CDE"
> plot "C.dat", "D.dat", "E.dat"
>
> ... and so on for many plots
>
> I don't see the advantage in requiring that the terminal be
> re-opened between plots [[...]]
Hmm. If you do this, (when) does 'plit1.foo' get closed? I was under
the impression that this only happened when the script explicitly said
'set output' to close the current output file. I thought I'd seen the
advice to do this in the online help somewhere, but at the moment the
closest I can find is 'help set output':
# By default, screens are displayed to the standard output. The `set output`
# command redirects the display to the specified file or device.
#
# Syntax:
# set output {"<filename>"}
# show output
#
# The filename must be enclosed in quotes. If the filename is omitted, any
# output file opened by a previous invocation of `set output` will be closed
# and new output will be sent to STDOUT.
ciao,
--
-- "Jonathan Thornburg [remove -animal to reply]" <jt...@as...>
Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
"Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
-- quote by Freire / poster by Oxfam
|