[Tex/LaTex] Problem with space between title and figure

lyxspacing

it is my first time that i use latex, in particular lyx. I have to make a very simple page with a title a figure and 3 authors, but something strange happens when i put the figure after the title: there is a very big space and i don't know why, i think that when i press enter lyx does not exit from the title, however i do not have any idea about how to solve it.

code:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}
\usepackage{babel}
\begin{document}

\title{Requirements Analysis and Specifications Document}

\maketitle
\begin{figure}
\begin{centering}
\includegraphics[scale=0.4]{../Desktop/Logo_polimi_grande}
\par\end{centering}
\caption{Politecnico di Milano}

\end{figure}

\end{document}

Here the pdf created

Best Answer

Beside solution provided by @Johannes_B in his comment try the following:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}
\usepackage{babel}
\begin{document}

\title{Requirements Analysis and Specifications Document}

\maketitle
\begin{figure} 
\centering
\includegraphics[scale=0.4]{example-image}
\end{figure}

\end{document}
Related Question