I want to position 3 images side by side. Actually I am doing like this, but they don't get side by side (see the pic on the bottom). Also is there any way to show only 1 caption for these 3 figures?
\begin{figure}[ht]
\begin{minipage}[b]{0.3\linewidth}
\centering
\includegraphics[scale=1]{i/houghtrain.png}
\caption{default}
\label{fig:figure1}
\end{minipage}
\hspace{0.3cm}
\begin{minipage}[b]{0.4\linewidth}
\centering
\includegraphics[width=\textwidth]{i/houghframe.png}
\caption{default}
\label{fig:figure2}
\end{minipage}
\hspace{0.3cm}
\begin{minipage}[b]{0.4\linewidth}
\centering
\includegraphics[width=\textwidth]{i/houghspace.png}
\caption{default}
\label{fig:figure3}
\end{minipage}
\end{figure}
They are not good positioned:

We can go outside the margin of the document if it is needed