0

Well, I'm using this to generate my graph.tex and graph.eps files from gnuplot:

set terminal epslatex input color colortext size 11.6cm, 8.5cm solid linewidth 2

But when I use

\begin{center}
\begin{figure}[h]
\input{graph}
\end{figure}
\end{center}

the text is centered but the image is not (it is a little bit up and to the right). Here's what it produces

What I'm getting

I already tried changing the order of the center and figure environments and putting the [htp] option instead of just [h].

How can I fix this?

Thanks for reading!

Larara
  • 303
  • 1
    Probably, the margins of your gnuplot image aren't symmetric. Use \fbox{\input{graph}} to see the margins. And you don't need to use a floating environment with beamer. Just use \begin{center}\input{graph}\end{center} or a minipage. – Christoph May 14 '14 at 09:51
  • OK. I removed the figure environment and left jus the center. I also put the \fbox preceding the \input. What I see is a margin that seems to be the page margin and the margins of the gnuplot image are deslocated with respect to these (they are a little up and to the right)... Thanks very much for your attention! – Larara May 14 '14 at 09:59
  • See e.g. http://stackoverflow.com/q/23596518/2604213 for reducing the white space. – Christoph May 14 '14 at 10:08
  • Related: http://tex.stackexchange.com/a/176217/1952 – Ignasi May 14 '14 at 10:09
  • 4
    This question appears to be off-topic because it is about a problem due to a wrong option passed to a script not connected to TeX and friends. – egreg May 14 '14 at 21:10
  • In my case the misalignment was fixed by the answer here http://tex.stackexchange.com/a/344190/60337 – Gigo Feb 02 '17 at 21:51

1 Answers1

1

I found it!

The problem was when I was using ps2pdf to create a pdf version of graph.eps, I was using

ps2pdf -dEPScrop graph.eps graph.pdf

instead of

ps2pdf -dEPSCrop graph.eps graph.pdf

(Damn you, capital c!)

The last one gave me the correct plot!

Anyway, thanks very much for the comments guys :)

Larara
  • 303