Skip to content

Instantly share code, notes, and snippets.

@mollietaylor
Created October 31, 2012 04:08
Show Gist options
  • Save mollietaylor/3984730 to your computer and use it in GitHub Desktop.
Save mollietaylor/3984730 to your computer and use it in GitHub Desktop.
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}
@gabrielsmenezes
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment