# Cropping figures cuts the upper caption

I tried to crop the blank space above and below the image with \includegraphics[trim=left bottom right top, clip]. It worked very well at the bottom, however at the top it cuts the title (caption). How can I crop the blank space between the title and the image?

\begin{figure}[b]
\centering
\caption{Disaster events in the period 2005-2008}
\includegraphics[trim =0cm 2.5cm 0cm 0.4cm clip, width=\textwidth]{XXX.pdf}
\caption*{\footnotesize{\textbf{Notes:} XXX}.}
\label{XXX}
\end{figure}


I downloaded the full figure following your code and applied trim and clip to eliminate all text and space around the center map.

I also removed the unneeded \caption*. (In your code a comma is missing before clip)

\documentclass[12pt,a4paper]{article}

\usepackage{graphicx}

\begin{document}
\begin{figure}
\centering
\caption{Disaster events in the period 2005-2008}
\includegraphics[trim =4cm 4.5cm 4cm 6cm, clip, width=\textwidth]{9Q2tV.png}
{\footnotesize\textbf{Notes:} XXX.} % changed <<<<<<<<<<
\label{XXX}
\end{figure}

\begin{figure}
\centering
\caption{Disaster events in the period 2005-2008}
\includegraphics[trim =3cm 3cm 3cm 3cm, clip, width=\textwidth]{example-image.pdf}
{\footnotesize\textbf{Notes:} XXX.} % changed <<<<<<<<<<
\label{XXX}
\end{figure}

\end{document}


It also works with the test image example-image.pdf provided by graphicx.