help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pslatex terminal output--Problem identified.


From: Dmitri A. Sergatskov
Subject: Re: pslatex terminal output--Problem identified.
Date: Sat, 1 Oct 2005 17:11:10 -0600

The sticky options may help with typing in a short  interactive
session, but generally
they are bad idea (in my opinion). E.g. you may have set some options
at the beginning of the session and later you want some different options.
Since you may have forgotten which options you did modify
the only sure way to get the desired options is to set terminal with
_all_ options
explicitly specified. What making thing worse is that "default" keyword
apparently does not set all options to the default state but only some.
Those problems become especially painful, when gnuplot is driven by an external
program (e.g. octave). See this thread for one example:

http://www.octave.org/octave-lists/archive/help-octave.2005/msg03471.html

Sincerely,

Dmitri.

On 10/1/05, Petr Mikulik <address@hidden> wrote:
> 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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]