0

I'm trying to remove all the unecessary space, but I don't know how to proceed here, I already done what is possible to delete all blank space of the graph (the figure starts at the edge of the chart). Does anyone know how to remove or decrease this space?

\begin{figure}[ht]
\includegraphics[width=0.4\textwidth]{figures/pontosdesejados.pdf}\centering
\caption{$r$ fixed points}
\label{desiredpoints}
\end{figure}

enter image description here

Ga13
  • 105
  • 1
    Welcome to TeX.SX! There are countless factors which could be adding that space. Without seeing the code which produces it, it is impossible to answer. Please add a minimal working example (MWE) of your document. – Phelype Oleinik Jul 05 '19 at 14:30
  • 1
    Welcome to tex.sx. The gap between a figure and its caption is usually defined in the document class, so at least that information is needed. But there is also a hack: insert a blank line following the \includegraphics line, and on another line, \vspace{-6pt} or whatever negative value you find gives the spacing you prefer. – barbara beeton Jul 05 '19 at 14:35
  • @barbarabeeton this works very well. Thank you very much! – Ga13 Jul 05 '19 at 14:50

1 Answers1

0

With use of the caption package you can simply set distance between picture and caption globally:

  • without extra distance:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[skip=0ex]{caption}  % <---

\begin{document}
\begin{figure}[ht]
\includegraphics[width=0.4\textwidth]{figures/pontosdesejados.pdf}\centering
\caption{$r$ fixed points}
\label{desiredpoints}
\end{figure}
\end{document}

enter image description here

  • with distance of 1ex:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[skip=0ex]{caption}

\begin{document}
\begin{figure}[ht]
\includegraphics[width=0.4\textwidth]{figures/pontosdesejados.pdf}\centering
\caption{$r$ fixed points}
\label{desiredpoints}
\end{figure}
\end{document}

enter image description here

Zarko
  • 296,517