On Tue, 2010-02-23 at 18:24 +0000, Leo Butler wrote:
> plot2d(...,[gnuplot_preamble,"set terminal postscript; set output
> \"foo.eps\";"]);
>
> appears to require that subsequent calls manually reset the terminal
> to the default. This is not expected behaviour, and I wonder why the
> change was made if it was intended.
I have fixed this bug, but its solution has not been committed to the
repository yet because the CVS sever is currently down. It will be
committed when the server goes up again.
The problem was introduced when the default gnuplot terminal command for
Unix systems was changed from "x11" to empty. That was done to allow
different installations to use their default terminal, which in most
cases is better than "x11" (wxt is much nicer than x11). The change
worked fine when the gnuplot format was used, because in that case a new
gnuplot session is started for each plot command.
However, when the gnuplot_pipes format is used, a plot command does not
start a new gnuplot session but instead the plot is sent to an open
gnuplot session. When the terminal was changed into postscript and then
back to the default terminal, this last step did not change the
terminal, leaving it as postscript. To avoid that problem while letting
each site use its own default terminal, the default gnuplot terminal
command will now be defined as "set term pop", which restores the
initial terminal used when gnuplot was started; in fact, it is a good
idea to use the same command at Windows sites, anticipating that
different Windows versions of gnuplot might have a default terminal
different from the "windows" terminal currently used.
Thanks to Leo for reporting this bug.
Regards,
Jaime