Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 750 Bytes

figures.md

File metadata and controls

41 lines (32 loc) · 750 Bytes

Working with figures

Simple figure

\begin{figure}[!htbp]
    \centering
    \includegraphics{path/to/figure.pdf}
    \caption{Figure caption here.}
    \label{fig:fig-label}
\end{figure}

The !htbp forces the image position.

Figures side by side

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}


\begin{figure}
    \centering
    \begin{subfigure}{0.45\textwidth}
        \includegraphics{fig1.pdf}
        \label{fig:fig1}
        \caption{fig1 caption}
    \end{subfigure}
    
    \begin{subfigure}{0.45\textwidth}
        \centering
        \includegraphics{fig2.pdf}
        \label{fig:fig2}
        \caption{fig2 caption}
    \end{subfigure}
    \caption{global caption}
\end{figure}