PDA

View Full Version : [ubuntu] [pdflatex][gnuplot][epstopdf] plot labels and title don't show



con-f-use
October 13th, 2011, 05:34 PM
Hi,

when I try to use the epstopdf package in texlive-font-utils to include a plot created with GnuPlot none of the axis labels, titels and other text shows in the pdf. What am I doing wrong?

Both the LaTeX and the gnuplot sources are shown below. Gnuplot creates "plot.eps" and "plot.tex". The latter containing the labels and all other text while the former contains the graph and grid. The Latex-package epstopdf is now supposed to convert the eps to pdf, update "plot.tex" and include it into the document. It seems to only to the converting and than including the "plot.pdf" file instead of updating and including "plot.tex".

I appreceate all help! Thanks in advance.

This is how it's supposed to look like:
http://img828.imageshack.us/img828/2449/supposed.png

This is how it currently looks looks:
http://img824.imageshack.us/img824/6539/actualv.png

Versions:

pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)
gnuplot 4.4 patchlevel 2
Ubuntu 11.04LaTeX-file:

\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8x]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}

\begin{document}

\section{Foobar}

\includegraphics[width=0.49\textwidth]{plot}

\end{document}Gnuplot-file:

#!/usr/bin/gnuplot -persist
reset

set terminal X11
set title "Some plot of $\alpha$"
set xlabel "$\\alpha$ in arbitrary units"
set ylabel "$f(\\alpha)$ in arbitary units"
set autoscale
set grid
set key top right

f(alpha) = 5*alpha
plot f(x)

set terminal epslatex color
set output "plot.eps"
replot

con-f-use
October 13th, 2011, 06:09 PM
Confirming this problem would help me.

sanderd17
October 13th, 2011, 07:12 PM
And if you forget about the epstopdf package, and just execute


epstopdf plot.eps


for each file (it's easy to let it loop over all files if you want). Does it work now?

con-f-use
October 13th, 2011, 08:10 PM
First of all: Thanks for the answer.

And no it does not work - at least not completely.

For some reason pdftex only includes the generated pdf picture named "plot.pdf". The pdf picture contains the none text part of the plot only. The text part (labels etc.) is in plot.tex generated by gnuplot. I can use "\input{plot.tex}" and everything displays right as long as "plot.tex" and "plot.pdf" are in the root directory. If they were not in the root directory I had to set the directory manually in "plot.tex".

But the epstopdf-package ist supposed to work using just "\includegrapics{plot}" and doing everything else automatically (changing "plot.tex", converting "plot.eps" to pfd, including the converted pdf) and that even if the plots are in an arbitrary directory. I wonder why that's not working. Of course I can change the files and do the conversion via a shell script. But that's unnerving and not in the sence of the inventor :D.

sanderd17
October 13th, 2011, 11:58 PM
I always convert them first, so I'm not used to that package.

Bump me again tomorrow if you want, I'm gonna dig a little deeper for that, but it's too late in the evening to do that now.