2

I am adding a pdf figure in my text using the following code

\begin{figure}[H]
    \centering
    \includegraphics[width=.6\textwidth]{image.pdf}
    \caption{blablabla.}
    \label{123}
\end{figure}

In this way the figure has a black frame around. How to get rid of the frame? Basically I am looking for something that does the opposite of \fbox{\includegraphics...}

The figure is an Excel diagram that was saved as a pdf image. This is what I get: 123

  • 5
    The default definitions would add no frame. You need to show the code you are using. – David Carlisle Feb 25 '16 at 13:45
  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Are you certain the original PDF doesn't have the border around it? Is there a minimal working example (MWE) you can create with a sample image? – Mike Renfro Feb 25 '16 at 13:46
  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Seamus Feb 25 '16 at 13:48
  • My pdf image is an Excel diagram that was saved as a pdf image. – marta Feb 25 '16 at 13:51
  • 2
    I assume that your original pdf has the black frame. If so, you can use the answers to the following question to trim it. Not sure if this should be marked as a duplicate. The other question asks about removing white space, but many of the answers also work for a black frame. tex.stackexchange.com/questions/25806/… – James Feb 25 '16 at 13:55
3

Your code does not add a border around the figure. The figure it self probably has a black border around it. Try cropping the figure using the following code:

\begin{figure}[htbp]
\begin{center}
    \includegraphics[trim=left bottom right top, clip]{file}
\caption{default}
\label{default}
\end{center}
\end{figure}

To cut a little of your figure, you could adjust your code as follows:

\begin{figure}[H]
    \centering
    \includegraphics[width=.6\textwidthtrim=.01cm .01cm .01cm .01cm, clip]{image.pdf}
    \caption{blablabla.}
    \label{123}
\end{figure}

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.