0

I want to plot the figures side by side, so for this I have the following code:

\usepackage{subcaption}
\begin{document}
\begin{figure}
    \begin{subfigure}{0.32\textwidth}
        \centering
        \includegraphics[width=\linewidth]{rect-dtft-32}
        \caption{caption 1}
        \label{rect-32} 
    \end{subfigure}
\begin{subfigure}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{bart-dtft-32}
    \caption{caption 2} 
    \label{bart-32}
\end{subfigure}

\begin{subfigure}{0.32\textwidth}
    \centering
    \includegraphics[width=\linewidth]{hamm-dtft-32}
    \caption{caption 3} 
    \label{hamm-32}
\end{subfigure}

\end{figure} \end{document}

and my result is

resulting figure

Figures are plotted vertically instead of horizontally. Where am I making a mistake?

Thanks!

Python
  • 111

0 Answers0