|
From: Ethan M. <merritt@u.washington.edu> - 2007-11-20 23:24:13
|
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}
--
Ethan A Merritt
|