Ethan Merritt wrote:
> That's not what the documentation says. It says: When both `set
> terminal` and `set output` are used together it is safest to give
> `set terminal` first
That's meant to be talking about when you open a terminal. My comment
was about how you close it. Bernhard's scripts, executed in the given
order, do this:
set term post
set output 'file1'
# plot something ...
set term x11
set term post
set output 'file2'
# ...
reset
set term x11
What I was suggesting was that there should usually be a 'set output'
to close the file, *before* the 'set term x11'.
> It sounds like the bug being reported may be the same one that is
> corrupting my PostScript output when I try to use push/pop term.
It may very well be. "set term pop" and "set term x11" are essentially
the same thing, and they both lack the closing 'set output'.
In a nutshell, 'set term' to a different driver, while output is
directed to a file, has to close that file (i.e. simulate 'set output')
at some point before the new driver writes anything to output file. The
mechanisms to actually do that are quite intricate (check variable
term_initialised, and watch for calls to term_set_output()).
|