|
From: Dmitri A. S. <das...@gm...> - 2005-09-22 03:17:59
|
FYI From the octave list: Sincerely, Dmitri. ---------- Forwarded message ---------- From: John W. Eaton <jw...@be...> Date: Sep 21, 2005 8:24 PM Subject: Re: pslatex terminal output--Problem identified. To: Pete Gustafson <wat...@ya...> Cc: he...@oc... 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 ------------------------------------------------------------- |