Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Subfigures in LaTeX
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{0.4\textwidth} % width of left subfigure
\includegraphics[width=\textwidth]{rncalt.png}
\caption{RNC} % subcaption
\end{subfigure}
\vspace{1em} % here you can insert horizontal or vertical space
\begin{subfigure}{0.4\textwidth} % width of right subfigure
\includegraphics[width=\textwidth]{dncalt.png}
\caption{DNC} % subcaption
\end{subfigure}
\caption{Wordcloud of national conventions} % caption for whole figure
\end{figure}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment