[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pslatex terminal output--Problem identified.
From: |
Petr Mikulik |
Subject: |
Re: pslatex terminal output--Problem identified. |
Date: |
Sat, 1 Oct 2005 17:42:56 -0500 |
No, there is no bug. And it has nothing to do with "set term pop|push".
According to "help set terminal":
Several terminals have many additional options. For example, see `png`,
or `postscript`.
The options used by a previous invocation `set term <term> <options>` of a
given `<term>` are remembered, thus subsequent `set term <term>` does
not reset them. This helps in printing, for instance, when switching
among different terminals---previous options don't have to be repeated.
Thus with
set term post eps
show term
set term post
show term
it will stay with eps options.
For postscript terminal, use "set term default" to reset to default values.
(However, this option is not available for other terminals.)
FYI
From the octave list:
Sincerely,
Dmitri.
---------- Forwarded message ----------
From: John W. Eaton <address@hidden>
Date: Sep 21, 2005 8:24 PM
Subject: Re: pslatex terminal output--Problem identified.
To: Pete Gustafson <address@hidden>
Cc: address@hidden
OK, I think this might be a bug in gnuplot. You can reproduce it with
the following commands (these are essentially the commands that Octave
is sending to gnuplot, but plotting a function instead of a data file
to simplify things a bit)):
plot sin(x) title "line 1"
set terminal push
set term postscript eps enhanced color solid
set output "foo.eps"
replot
set terminal pop
set output
replot
set term pslatex
set output "foo.tex"
replot
quit
I have not looked at the code, so I am only guessing here, but it
seems that the problem might be that gnuplot is hanging on to some
postscript terminal options even after the set terminal pop statement
is executed. If you insert something like
set term postscript landscape
just after the set terminal pop statement, the problem goes away. But
how can Octave know that it should do that? It seems it would be
better for "set term pop" to restore the state of the terminal driver
to whatever it was when "set term push" was executed.
Here is a simpler example. Compare foo.eps vs. foo.ps from the
following two scripts.
1:
plot sin(x) title "line 1"
set terminal push
set term postscript
set output "foo.ps"
replot
set terminal pop
set output
replot
set term postscript eps enhanced color solid
set output "foo.eps"
replot
quit
2:
plot sin(x) title "line 1"
set terminal push
set term postscript eps enhanced color solid
set output "foo.eps"
replot
set terminal pop
set output
replot
set term postscript
set output "foo.ps"
replot
quit
Looking at these I would expect foo.ps in both cases to be the simple
full page postscript plot. But in the second case, both plots are
small eps style plots.
I just checked the latest CVS gnuplot and it seems the behavior is the
same. Would someone like to report this problem and find out if it is
intentional behavior or a bug?
Thanks,
jwe
-------------------------------------------------------------
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
-------------------------------------------------------------
- Re: pslatex terminal output--Problem identified.,
Petr Mikulik <=
- Re: pslatex terminal output--Problem identified., Dmitri A. Sergatskov, 2005/10/01
- Re: pslatex terminal output--Problem identified., Petr Mikulik, 2005/10/02
- Re: pslatex terminal output--Problem identified., Dmitri A. Sergatskov, 2005/10/02
- Re: pslatex terminal output--Problem identified., Ethan A Merritt, 2005/10/02
- Re: pslatex terminal output--Problem identified., Dmitri A. Sergatskov, 2005/10/02
- Re: pslatex terminal output--Problem identified., Ethan A Merritt, 2005/10/02
- Re: pslatex terminal output--Problem identified., John W. Eaton, 2005/10/04
- Re: pslatex terminal output--Problem identified., Petr Mikulik, 2005/10/04
- Re: pslatex terminal output--Problem identified., John W. Eaton, 2005/10/04
- Re: pslatex terminal output--Problem identified., Ethan Merritt, 2005/10/04