Gnuplot graphs in LaTeX. See http://www.ctan.org/pkg/gnuplottex
3
stars
1
forks
source link
When in \begin{gnuplot} the [terminal=...] option isn't defined, it is set to default value terminal=latex. But in recent gnuplot the latex terminal is replaced with newer ones #18
Ok, I am building "example-pdf.tex", included in the package.
When the code
\begin{gnuplot}[scale=0.8]
set grid
set title 'gnuplottex test $e^x$'
set ylabel '$y$'
set xlabel '$x$'
plot exp(x) with linespoints
\end{gnuplot}
is translated by gnuplottex, the file "example-pdf-gnuplottex-fig2.gnuplot" is generated with the contents:
set terminal latex
set output 'gnuplottex/example-pdf-gnuplottex-fig2.tex'
set grid
set title 'gnuplottex test $e^x$'
set ylabel '$y$'
set xlabel '$x$'
plot exp(x) with linespoints
The problem is that the modern gnuplot 5.4.1 does not have the latex terminal (so treats this as "set terminal unknown").
So in this example the second graph is not built by gnuplot and, consecuently, is absent in resulting file "example-pdf.pdf".
Proof on page 261 of Gnuplot_5_4.pdf documentation:
"Latex
Note: Legacy terminal (not built by default). The latex, emtex, eepic, and tpic terminals in older versions
of gnuplot provided minimal support for graphics styles beyond simple lines and points. They have been
directly superseded by the pict2e terminal. For more capable TeX/LaTeX compatible terminal types see
cairolatex (p. 239), context (p. 245), epslatex (p. 251), mp (p. 266), pstricks (p. 280), and tikz
(p. 286)."
Ok, I am building "example-pdf.tex", included in the package.
When the code
\begin{gnuplot}[scale=0.8] set grid set title 'gnuplottex test $e^x$' set ylabel '$y$' set xlabel '$x$' plot exp(x) with linespoints \end{gnuplot}
is translated by gnuplottex, the file "example-pdf-gnuplottex-fig2.gnuplot" is generated with the contents:
set terminal latex set output 'gnuplottex/example-pdf-gnuplottex-fig2.tex' set grid set title 'gnuplottex test $e^x$' set ylabel '$y$' set xlabel '$x$' plot exp(x) with linespoints
The problem is that the modern gnuplot 5.4.1 does not have the latex terminal (so treats this as "set terminal unknown"). So in this example the second graph is not built by gnuplot and, consecuently, is absent in resulting file "example-pdf.pdf".
Proof on page 261 of Gnuplot_5_4.pdf documentation: "Latex Note: Legacy terminal (not built by default). The latex, emtex, eepic, and tpic terminals in older versions of gnuplot provided minimal support for graphics styles beyond simple lines and points. They have been directly superseded by the pict2e terminal. For more capable TeX/LaTeX compatible terminal types see cairolatex (p. 239), context (p. 245), epslatex (p. 251), mp (p. 266), pstricks (p. 280), and tikz (p. 286)."