[Tex/LaTex] Big space between subsection, text and graphics

graphicssectioningspacing

I have a problem with space between subsection, text and image. I have code:

\documentclass[12pt, a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage{caption}

\begin{document}
\subsection{Some title}
Some text in section

\begin{center}
\includegraphics[scale=0.8]{image1.jpg}
\captionof{figure}{Diagram klas aplikacji serwera}
\end{center}
\begin{center}
\includegraphics[scale=0.75]{image2.jpg}
\captionof{figure}{Diagram klas aplikacji klienta}
\end{center}

\subsection{Some title 2}
Some text...
\end{document}

And my document looks like this: image

Best Answer

Write \raggedbottom into the preamble.

Related Question