|
From: Philipp K. J. <ja...@ie...> - 2007-11-20 23:39:08
|
I made a mistake when pasting the gnuplot
session in the previous email. The problem is
NOT a missing "replot" command. Let me try
again - as you can see the problem is specific
to a plot to wxt preceding the plot to epslatex.
It does not happen when plotting to X11 first.
===================================
Bad Session:
Terminal type set to 'wxt'
gnuplot> plot sin(x)
gnuplot> set t epslatex standalone
Terminal type set to 'epslatex'
Options are ' leveldefault monochrome blacktext \
dashed dashlength 1.0 linewidth 1.0 butt \
palfuncparam 2000,0.003 \
noheader "" 11 '
gnuplot> set o "broken.tex"
gnuplot> replot
gnuplot> exit
Segmentation fault
janert/FOO> latex broken.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./broken.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman,
b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto,
e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk,
polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish,
tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf/tex/latex/base/size11.clo)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/dvips.def)))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/dvipsnam.def))
(/usr/share/texmf/tex/latex/geometry/geometry.sty
(/usr/share/texmf/tex/latex/geometry/geometry.cfg))
No configuration file gnuplot.cfg found.
No file broken.aux.
)
*! Interruption.
<*>
? x
No pages of output.
Transcript written on broken.log.
=================================
Good Session
Terminal type set to 'wxt'
gnuplot> set t x11
Terminal type set to 'x11'
Options are '0'
gnuplot> plot sin(x)
gnuplot> set t epslatex standalone
Terminal type set to 'epslatex'
Options are ' leveldefault monochrome blacktext \
dashed dashlength 1.0 linewidth 1.0 butt \
palfuncparam 2000,0.003 \
noheader "" 11 '
gnuplot> set o "good.tex"
gnuplot> replot
gnuplot>
janert/FOO> latex good.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./good.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman,
b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto,
e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk,
polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish,
tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf/tex/latex/base/size11.clo)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/dvips.def)))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/dvipsnam.def))
(/usr/share/texmf/tex/latex/geometry/geometry.sty
(/usr/share/texmf/tex/latex/geometry/geometry.cfg))
No configuration file gnuplot.cfg found.
No file good.aux.
<good-inc.eps> [1] (./good.aux) )
Output written on good.dvi (1 page, 692 bytes).
Transcript written on good.log.
On Tuesday 20 November 2007 15:24, Ethan Merritt wrote:
> On Tuesday 20 November 2007 14:23, Philipp K. Janert wrote:
> > Basically, if I have plotted a graph to wxt, then
> > the files written later (in the same session)
> > using epslatex seem to be incomplete.
>
> It is not a question of what terminal came before,
> but rather a question of what happened after.
> (unless, of course, there is indeed a bug we don't know about)
>
> > This does also not occur if I plot to wxt, then
> > plot to epslatex, then plot AGAIN to wxt.
> > Apparently, resetting the terminal and/or
> > the output flushes everything to file...?
>
> Yes. This is known, well-documented, and basically could
> not work any other way. But it doesn't have anything to
> do with wxt.
>
> > And I have not noticed this kind of problem
> > with any other terminal (PNG, Postscript, ...).
>
> It is the same with PostScript, and with any terminal
> type that can produce an output document containing
> more than one plot. PNG is not an example, but this
> would also hit I think SVG, MIF, PDF, etc.
>
> > Terminal type set to 'wxt'
> > gnuplot> set t x11
> > Terminal type set to 'x11'
> > Options are '0'
> > gnuplot> plot sin(x)
> > gnuplot> set terminal epslatex standalone
> > Terminal type set to 'epslatex'
> > Options are ' leveldefault monochrome blacktext \
> > dashed dashlength 1.0 linewidth 1.0 butt \
> > palfuncparam 2000,0.003 \
> > noheader "" 11 '
> > gnuplot> set o 'good.tex'
> > gnuplot> replot
>
> OK. At this point you have opened an latex file and written
> one plot to it. The program does not know if you are going
> to add any additional plots, so it still has the file open and
> has not yet written the close document statements.
> At this point the end of the *.tex file looks like this:
> \gplgaddtomacro\gplfronttext{%
> \csname LTb\endcsname%
> \put(5971,4603){\makebox(0,0)[r]{\strut{}sin(x)}}%
> }%
>
> If you now do
>
> > gnuplot> set term ... anything
>
> or
>
> > gnuplot> set output ... anything
>
> The program now knows no more plots will be written to the
> previous output file. So it finishes off the previous output
> file and closes it. At this point the end of the *.tex file
> looks like this:
> \gplgaddtomacro\gplfronttext{%
> \csname LTb\endcsname%
> \put(5971,4603){\makebox(0,0)[r]{\strut{}sin(x)}}%
> }%
> \gplbacktext
> \put(0,0){\includegraphics{good-inc}}%
> \gplfronttext
> \end{picture}%
> \endgroup
> \end{document}
|