2

I have 5 pictures and want to align them that three pictures are on the left side above each other and two on the right side. I have tried it like this

\begin{figure}
\centering
\begin{subfigure}[h]{.48\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{pictures/deltaphi_09_21.png}
\caption{Measurement 1: 2:1 CO$_2$-Argon.}
\label{fig:delta phi 1}
\end{subfigure}
\begin{subfigure}[h]{.48\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{pictures/deltaphi_10_11.png}
\caption{Measurement 2: 1:1 CO$_2$-Argon.}
\label{fig:delta phi 2}
\end{subfigure}
\\
\begin{subfigure}[h]{.48\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{pictures/deltaphi_08_21.png}
\caption{Measurement 3: 2:1 CO$_2$-Argon.}
\label{fig:delta phi 3}
\end{subfigure}
\begin{subfigure}[h]{.48\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{pictures/deltaphi_08_11.png}
\caption{Measurement 4: 1:1 CO$_2$-Argon.}
\label{fig:delta phi 4}
\end{subfigure}
\\
\begin{subfigure}[h]{.48\textwidth}
\includegraphics[width=0.9\textwidth, left]{pictures/deltaphi_11_21.png}
\caption{Measurement 5: 2:1 CO$_2$-Argon.}
\label{fig:delta phi 5}
\end{subfigure}
\caption{Phase shift of the different plasma measurements over their incident power.}
\label{fig:delta phi over P} 
\end{figure}

My problem is that the last picture is still in the center but I want it exactly under the two left pictures.

1
  • 1
    There is no [h] option to subfigure and it's simply ignored.
    – egreg
    Sep 25 at 21:03

2 Answers 2

3

I would delete all \centering directives, set the widths of the individual graphs to 1\textwidth rather than 0.9\textwidth, insert \hfill directives between adjacent subfigure environments, and issue \medskip directives between the rows of subfigures. And, for good measure, do consider loading a LaTeX chemistry package, such as mhchem, and replacing all instances of CO$_2$ with \ce{CO2}. (I believe that "ce" is short for "chemical expression".)

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage[demo]{graphicx} % remove 'demo' option in real document
\usepackage{subcaption} % for subfigure environment
\usepackage{mhchem}     % for \ce macro
\begin{document}

\begin{figure}
\captionsetup[subfigure]{skip=0.333\baselineskip} % place captions closer to graphs

\begin{subfigure}{.48\textwidth}
\includegraphics[width=1\textwidth]{pictures/deltaphi_09_21.png}
\caption{Measurement 1: 2:1 \ce{CO2}-Argon.}
\label{fig:delta phi 1}
\end{subfigure}\hfill % <-- new
\begin{subfigure}{.48\textwidth}
\includegraphics[width=1\textwidth]{pictures/deltaphi_10_11.png}
\caption{Measurement 2: 1:1 \ce{CO2}-Argon.}
\label{fig:delta phi 2}
\end{subfigure}

\medskip % <-- new
\begin{subfigure}{.48\textwidth}
\includegraphics[width=1\textwidth]{pictures/deltaphi_08_21.png}
\caption{Measurement 3: 2:1 \ce{CO2}-Argon.}
\label{fig:delta phi 3}
\end{subfigure}\hfill % <-- new
\begin{subfigure}{.48\textwidth}
\includegraphics[width=1\textwidth]{pictures/deltaphi_08_11.png}
\caption{Measurement 4: 1:1 \ce{CO2}-Argon.}
\label{fig:delta phi 4}
\end{subfigure}

\medskip
\begin{subfigure}{.48\textwidth}
\includegraphics[width=1\textwidth]{pictures/deltaphi_11_21.png}
\caption{Measurement 5: 2:1 \ce{CO2}-Argon.}
\label{fig:delta phi 5}
\end{subfigure}

\caption{Phase shift of the different plasma measurements over their incident power.}
\label{fig:delta phi over P} 

\end{figure}

\end{document}
1
  • 1
    Thank you! This works fantastic
    – jane
    Sep 26 at 17:36
2

Add a "fake image" in the form of \hspace{0.48\textwidth} after the final (5th) image.

enter image description here

\documentclass{article}

\usepackage[draft]{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}
  \centering
  \begin{subfigure}{.48\textwidth}
    \centering
    \includegraphics[width=0.9\textwidth]{pictures/deltaphi_09_21.png}
    \caption{Measurement 1: 2:1 CO$_2$-Argon.}
  \end{subfigure}
  \begin{subfigure}{.48\textwidth}
    \centering
    \includegraphics[width=0.9\textwidth]{pictures/deltaphi_10_11.png}
    \caption{Measurement 2: 1:1 CO$_2$-Argon.}
  \end{subfigure}

  \begin{subfigure}{.48\textwidth}
    \centering
    \includegraphics[width=0.9\textwidth]{pictures/deltaphi_08_21.png}
    \caption{Measurement 3: 2:1 CO$_2$-Argon.}
  \end{subfigure}
  \begin{subfigure}{.48\textwidth}
    \centering
    \includegraphics[width=0.9\textwidth]{pictures/deltaphi_08_11.png}
    \caption{Measurement 4: 1:1 CO$_2$-Argon.}
  \end{subfigure}

  \begin{subfigure}{.48\textwidth}
    \centering
    \includegraphics[width=0.9\textwidth]{pictures/deltaphi_11_21.png}
    \caption{Measurement 5: 2:1 CO$_2$-Argon.}
  \end{subfigure}
  \hspace{.48\textwidth}\mbox{}
  \caption{Phase shift of the different plasma measurements over their incident power.}
\end{figure}

\end{document}
2
  • 3
    You may want to add vertical whitespace (e.g., via \medskip instructions) to assure that the subfigure captions are closer to their associated graphs than to the graphs below them.
    – Mico
    Sep 25 at 17:06
  • When I implemented it in my document the last picture was a bit shiftet more left than the pictures above. But still thank you a lot!
    – jane
    Sep 26 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .