# Why I can't put subfigure side by side? [closed]

I'm using subcaption package to make subfigures side by side but it doesn't work. One figure is on the top of the other. Could anyone help?

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[scale=.5]{NZ}
\caption{Center of earthquake}
\label{nz}
\end{subfigure}%

\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[scale=.5]{KAIK}
\caption{KAIK station}
\label{kaik}
\end{subfigure}%

\caption{}
\label{earthquake}
\end{figure}

• Remove empty line between them. – Sigur Jun 2 '18 at 23:59
• welcome to tex.se! just remove empty line between subfigures. it start new paragraph, so the subfigures can't be in line. – Zarko Jun 2 '18 at 23:59
• I'm voting to close this question as off-topic because the issue is solved in comments. – cfr Jun 3 '18 at 1:26