1

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}
  • 3
    Remove empty line between them. – Sigur Jun 2 '18 at 23:59
  • 1
    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
  • 4
    I'm voting to close this question as off-topic because the issue is solved in comments. – cfr Jun 3 '18 at 1:26

Browse other questions tagged or ask your own question.