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.

Werner
  • 603,163
dustin
  • 18,617
  • 23
  • 99
  • 204

1 Answers1

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.

Werner
  • 603,163
  • How could I trim the float if I switch to \begin{figure*}? – dustin Jun 25 '13 at 06:00
  • @dustin: It works in exactly the same way. The clipping of the image is independent of the environment. – Werner Jun 25 '13 at 06:05
  • @dustin: What documentation? – Werner Jun 25 '13 at 06: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 06:37