I am trying to use the epslatex terminal in gnuplot, using the example code from this site.
Copying and pasting this example and running the gnuplot script produces the following output:
No labels! This happens under Ubuntu 11.10 using gnuplot 4.4.4 and under Arch using gnuplot 4.6.0.
Looking at the output .tex
file it seems that the label text is there in the file, but might be put outside the plot area:
\begin{picture}(5040.00,3772.00)%
\gplgaddtomacro\gplbacktext{%
\csname LTb\endcsname%
\put(860,1122){\makebox(0,0)[r]{\strut{}$-1$}}%
\put(860,2086){\makebox(0,0)[r]{\strut{}$0$}}%
\put(860,3049){\makebox(0,0)[r]{\strut{}$1$}}%
\put(980,440){\makebox(0,0){\strut{}$-2\pi$}}%
\put(1875,440){\makebox(0,0){\strut{}$-\pi$}}%
\put(2770,440){\makebox(0,0){\strut{}$0$}}%
\put(3665,440){\makebox(0,0){\strut{}$\pi$}}%
\put(4560,440){\makebox(0,0){\strut{}$2\pi$}}%
\put(160,2085){\rotatebox{-270}{\makebox(0,0){\strut{}$y$}}}%
\put(2770,140){\makebox(0,0){\strut{}$x$}}%
}%
\gplgaddtomacro\gplfronttext{%
\csname LTb\endcsname%
\put(3725,3238){\makebox(0,0)[r]{\strut{}$\sin(x)$}}%
}%
\gplbacktext
\put(0,0){\includegraphics{terminal_epslatex-inc}}%
\gplfronttext
\end{picture}
Any ideas as to why there would be no label text visible here?
Best Answer
PEBKAC. I thought the generated .eps file was supposed to be the final (standalone) output, but it is necessary to run
pdflatex
on the generated .tex file to properly render the plot with labels.