Using gnuplot 4.1 CVS (I tried latest as of some time yesterday, and "cvs
up -D 20060424") against PDFlib lite 6.0.1, PDF output does not flush
until gnuplot exit.
$ gnuplot
gnuplot> set terminal pdf
gnuplot> set output "test.pdf"
gnuplot> test
now, in another terminal, try to open test.pdf. It won't work, and the file
will be exactly 4 KiB.
gnuplot> quit
now test.pdf works fine.
Logged In: YES
user_id=235620
That is normal, expected, and intended.
You can keep on writing plots into that output file until
you close it explicitly and/or open a new output file.
set term pdf
set output 4plots.pdf
test
plot sin(x)
plot "foo" with lines
splot x*y
unset output
# now the previous output file has been closed cleanly
To do otherwise would limit you to one plot per file.
Logged In: YES
user_id=360426
Ahh, thanks. Where is that documented? I don't see it under "output" or "pdf". Is
this true for other terminal types?
Logged In: YES
user_id=235620
This is true for all terminal types, although some terminals
stream their output and don't really need anything special
to terminate the stream.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gnuplot> 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.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
"set output" (with no file name) and "unset output" do the
same thing - close the output file, if any, and reset output
to stdout