0

I would like to have this arrangement

enter image description here

I don't really know the format of subfloats but I have this idea

\documentclass{article}
\usepackage{float}
\usepackage{graphicx}


\begin{document}

\begin{figure}
    \centering
    \subfloat[\centering ]{\includegraphics[height=.2\textheight]{example-image-a}
                            \includegraphics[height=.2\textheight]{example-image-b}}
    \subfloat[\centering ]{\includegraphics[height=.4\textheight]{example-image-c} }
    \caption{Caption}
    \label{fig:wa_analysis}
\end{figure}

\end{document}

Not entirely certain how to accomplish this.

Is there a better way to do this?

3
  • 1
    Please extend your code to a full but minimal example and please use images that others have access to (or use \rule{width}{height}) when we know wher \subfloat etc came from.
    – daleif
    Nov 17, 2022 at 11:53
  • Sorry, new to this. Done.
    – TheJeran
    Nov 17, 2022 at 12:06
  • Your document does not compile as it does not define \subfloat
    – daleif
    Nov 17, 2022 at 12:13

4 Answers 4

1

With this code:

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\begin{document}
    \begin{figure}
        \begin{minipage}{.65\textwidth}
            \begin{center}
                \includegraphics[width=\textwidth,height=5cm]{example-image-a}\\
                \includegraphics[width=\textwidth,height=5cm]{example-image-b}
                (a)
            \end{center}
        \end{minipage}
        \hfill
        \begin{minipage}{.33\textwidth}
            \begin{center}
                \includegraphics[width=\textwidth,height=10cm]{example-image-c}
                (b)
            \end{center}
        \end{minipage}
        \caption{Test fo 3 figure in one}
    \end{figure}
\end{document}

You have this output:

enter image description here

2

By use the subcaption package and some manula tweak for subfigure b height:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}[ht]
    \centering
\begin{subfigure}[b]{0.7\linewidth}
    \includegraphics[width=\linewidth,  height=.2\textheight]{example-image-a}\\
      
    \includegraphics[width=\linewidth,  height=.2\textheight]{example-image-b}
\caption{}
\end{subfigure}%
\hfil                           
\begin{subfigure}[b]{0.25\linewidth}
    \includegraphics[width=\linewidth, height=.423\textheight]{example-image-c}
\caption{}
\end{subfigure}  
                          
    \caption{Caption}
    \label{fig:wa_analysis}
\end{figure}

\end{document}

enter image description here

0

I would use minipage to stack two subfigures. In order to avoid guessing the height of the third figure, you can also use a box

enter image description here

\documentclass{article}
\usepackage{float}
\usepackage{graphicx}
\usepackage{subcaption}


\begin{document}

\begin{figure}[tbh]
  \sbox0{%
    \begin{minipage}[b]{0.75\textwidth}
      \subcaptionbox*{}{\includegraphics[height=0.2\textheight,width=\linewidth]{example-image-a}}
      \par
      \subcaptionbox{}{\includegraphics[height=0.2\textheight,width=\linewidth]{example-image-b}}
  \end{minipage}}
  \usebox0
  \hfill%
  \subcaptionbox{}{\includegraphics[height=\ht0,width=.22\textwidth]{example-image-c}}
  \caption{Caption}
  \label{fig:wa_analysis}
\end{figure}

\end{document}
0

This version uses \subfloat from the subcaption package. It seems that subfloat uses an \hbox instead of a \vbox, so you need a minipage, \parbox, \vbox or tabular to handle more than one line.

\lineskip is added when \baselineskip isn't big enough.

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
    \begin{figure}
        \subfloat{\parbox{.65\textwidth}{%
          \includegraphics[width=\hsize,height=5cm]{example-image-a}
          \includegraphics[width=\hsize,height=5cm]{example-image-b}
         }}
        \hfill
        \subfloat{%
          \includegraphics[width=.33\textwidth,height={\dimexpr 10cm+\lineskip}]{example-image-c}
        }
        \caption{Test fo 3 figure in one}
    \end{figure}
\end{document}

You must log in to answer this question.

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