Home > Papers, Tips > EPS bounding box problems

EPS bounding box problems

When I was writing my paper a faced some ugly problems with the eps files. Even though I change the bounding box of the files manually, as I explain before, some MATLAB figures didn’t show properly. Then searching for a solution I found a good tool to do the bounding box fixing automatically, epstool can do it with this simple line


epstool --copy --bbox input.eps output.eps

However, after this my problem remain. Then I could fix it by changing my latex statement when including the image, like this:


\includegraphics[clip]{figure}

The clip option makes \LaTeX to crop the image to the bounding box. :mrgreen:

About these ads
Categories: Papers, Tips Tags: , , ,
  1. cem ozen
    June 8, 2011 at 3:53 am

    Thanks a lot! I spent a good few hours trying to fix bad bounding box caused by xmgrace plotting program. The clip option to \includegraphics solved my problem.

  2. Hasan
    November 28, 2011 at 1:12 am

    Thank you for your post. I’ve got into trouble after converting SPSS figures into eps with redundant text which I could not get rid of. Your post solved my problem.

    • November 28, 2011 at 5:23 pm

      I’m glad it helps. :mrgreen:

  3. Saravanan K
    December 20, 2011 at 1:18 am

    Mate,

    Thanks!

    Though my figure shows correct bounding box its just not reflected in Latex document.

    Tried the below syntaxes,

    %\includegraphics[width=0.5\linewidth]{figures/graph_sk}
    %\includegraphics[width=0.3\textwidth]{figures/graph_sk}
    %\includegraphics[width=0.5\columnwidth]{figures/graph_sk}
    %\resizebox{0.5\columnwidth}{!}{\includegraphics{figures/graph_sk}}
    %\includegraphics[scale=0.4]{figures/graph_ska}
    \includegraphics[clip, scale=0.4]{figures/graph_sk}

    I spent a day trying to understand the problem and attempting to solve this but without a success till I bumped your blog.

    Thanks for sharing your learning.

  4. Yair
    January 25, 2012 at 2:19 pm

    Hello Fabbri,

    Could you please tell me where can I get your epstool program? It sounds great, and I am in a REAL crunch time!

    Thanks much, Yair

  5. Yair
    January 25, 2012 at 3:39 pm

    Hello again, Fabbri,

    I found, installed and ran it on an EPS file produced by a music program called Encore. Problem is that epstool tells me that my input file isn’t EPSF.

    I wish I knew how EPSF differs from EPS. Is there a way to satisfy epstool so it doesn’t complain about that?

    Thanks a lot, Yair

    • January 25, 2012 at 3:43 pm

      Did you check the Ghostscript page? The epstool is there for download.

      • Yair
        January 25, 2012 at 3:53 pm

        Thank you very much for replying to me, adin.

        I found, installed and ran it on an EPS file produced by a music program called Encore. The problem now is that epstool tells me that my input file isn’t EPSF.

        I wish I knew how EPSF differs from EPS. Is there a way to satisfy epstool so it doesn’t complain about that?

        I could attach this small file here if there was such a possibility.

        Thanks a lot, Yair

    • January 25, 2012 at 4:04 pm

      Try the one I give you in the link. That is the official one, maybe the one you obtain in that music program has some differences, or is tuned for a different purpose.

  6. asc
    March 6, 2013 at 6:08 pm

    Thank you so much !!!

  7. No
    February 5, 2014 at 5:26 pm

    This works! Great!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: