Graphics, Figures & TablesOffset in EPS Graphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
raschelfuss
Posts: 1
Joined: Wed May 15, 2013 8:04 am

Offset in EPS Graphics

Post by raschelfuss »

Hi,

I have to use XeLaTeX because a mandatory template is written for it. I recently had to completely reinstall my laptop. My problem since then (before it worked all fine!): when I include a graphic, the bounding box is correct, but the graphic appears with an offset -- see attached PDF.

I produced it by:

Code: Select all

\documentclass{article}
\usepackage{graphicx}

\begin{document}
  \begin{figure}
    \fbox{\includegraphics[clip]{images/diffVSint.eps}}
    \caption{Nice little caption.}
    \label{fig:diffvsint}
  \end{figure}
\end{document}
Some more info:
  • Manually including the bounding box by [bb=llx lly urx ury] does not change the situation.
  • Using a PDF instead of an EPS graphics file does not change the situation.
Thanks for your help.
Attachments
TEST.pdf
(89.41 KiB) Downloaded 528 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Offset in EPS Graphics

Post by cgnieder »

Hi raschelfuss,

Welcome to the LaTeX community!

Could you also attach the EPS file so we could try to reproduce the problem?

Regards
site moderator & package author
lorebene
Posts: 1
Joined: Mon Jun 03, 2013 11:55 pm

Offset in EPS Graphics

Post by lorebene »

Actually I have the same problem. After an actualization of libraries, the compilation in XeLaTeX fails to print in the correct position the figures. Is this related to graphicx? Or to trimming?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: Offset in EPS Graphics

Post by cgnieder »

Hi lorebene,

Welcome to the LaTeX community!

As I tried to point out in my answer before: without some file that let's us reproduce the problem the answer can only be: maybe. I actually very much doubt that there is any problem with graphicx: it has been a base LaTeX package for many, many years. I'd think it is much more likely that the error is in some wrong data within the EPS. But that is of course only speculation...

Regards
site moderator & package author
warren
Posts: 2
Joined: Thu Jun 13, 2013 11:01 am

Offset in EPS Graphics

Post by warren »

Hi,

Same problem. After updating MikTeX in the last week, included eps figures (produced within R) are offset to top right, by an amount seemingly corresponding to the origin of the bounding box set by R. In eight months of using XeLaTeX, this has not happened before. The eps has not changed (I have not regenerated it) and the source for XeLaTeX has not changed. All R figures are affected, but not those produced by (e.g.) Cytoscape, which have a bounding box starting "0 0". There is no "wrong data" in my eps. Can't seem to fix with bb, viewport or trim modifiers. Very frustrating. eps is attached. Here is the includegraphics snippet:

Code: Select all

\begin{figure}[!ht]
\includegraphics{fourdists}
\caption{Human protein frequency by count of species exhibiting orthology:\\ for
  different $e$ and species totals}
\label{four_dists}
\end{figure}
Hope someone can advise.

Regards,

Warren
Attachments
fourdists.eps
Four distribution charts in one eps graphic
(20.56 KiB) Downloaded 400 times
Last edited by cgnieder on Thu Jun 13, 2013 11:35 am, edited 1 time in total.
warren
Posts: 2
Joined: Thu Jun 13, 2013 11:01 am

Re: Offset in EPS Graphics

Post by warren »

I ran MiKTeX update today. The problem appears to be fixed.

Warren
Post Reply