I have an .eps figure which I produced with PyPlot (~matplotlib) in Julia. I have converted it to pdf with epstopdf fig.eps
When I include it in a document it is shifted up- and rightwards. Minimal code:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[t]
\fbox{\includegraphics[width=8cm]{fig.eps}}
\fbox{\includegraphics[width=8cm]{fig.pdf}}
\end{figure}
\end{document}
The .eps file is not automatically converted by xetex in .pdf (I don't know why). The .pdf file is correctly placed, but I don't want to have to convert my .eps file outside latex. The .eps file is problematic in itself, I tried with older .eps files that I had and it works just fine, but I am unable to output new .eps files with PyPlot displaying correctly (I don't know why).
Original .eps: https://ufile.io/2pfdk Converted .pdf: https://ufile.io/513ee
Is there a way to have xetex convert automatically .eps to .pdf so that they display correctly? Or is there a way to fix the faulty .eps files output by PyPlot? (Not really latex-related...)
texlive-full
? – G Viaud Jul 7 '17 at 10:44pdfcrop
on the pdf file. – Michael Palmer Jul 7 '17 at 15:08