3

How do I trim the bounding box of an .eps figure?

\documentclass{article}
\usepackage[caption = false]{subfig}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[H]
  \centering
  \includegraphics[width = 5in]{something.eps}
\end{figure}
\end{document}

enter image description here

I want to trim the top portion so the spacing between the equation and the figure isn't too much.

2

Since you are using the [H] float placement (supplied by float), it isn't actually a float. So you can just use a negative \vspace above the image; there is no need to modify float-related spacing, since you're not planning on moving this around.

Alternatively, you can specify a change in the viewport of the image. For this, see Clipping a figure to content.

  • How could I trim the float if I switch to \begin{figure*}? – dustin Jun 25 '13 at 6:00
  • @dustin: It works in exactly the same way. The clipping of the image is independent of the environment. – Werner Jun 25 '13 at 6:05
  • @dustin: What documentation? – Werner Jun 25 '13 at 6:18
  • 2
    @dustin: Use \includegraphics[trim=0 0 0 50bp,clip]{something.eps} to remove 50bp from the top of something.eps. The 4 numbers/lengths are <llx> <lly> <urx> <ury> and represent the (x,y) coordinates of the lower-left and upper-right corners of the bounding box of the image. – Werner Jun 25 '13 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.