0

I am looking to change the order of labels in a subfigure. I would like subfigures (a) and (b) to be the top two labels (left and right respectively), and subfigure figure (c) to be on the bottom left. In my work, the total height of the stacked figures on the left is the same as the figure on the right (which is unclear when I use these example images). That's why I have it formatted like this.

Here, I want the subfigure captions to be changed to match the letters on the inside of the subfigure. How do I do that?

enter image description here

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

\begin{document}

\begin{figure} \centering \begin{subfigure}{.45\textwidth} \centering \caption{Name me a} \includegraphics[width=\linewidth]{example-image-a}

\caption{Name me c} \includegraphics[width=\linewidth]{example-image-c} \end{subfigure}% \begin{subfigure}{.55\textwidth} \centering \caption{Name me b} \includegraphics[width=\linewidth]{example-image-b} \end{subfigure} \caption{example caption} \end{figure}

\end{document}

Qrrbrbirlbel
  • 119,821
Sean
  • 1
  • The other solution is to create the captions in the correct order and put them into saveboxes. See https://tex.stackexchange.com/questions/269301/subfigure-out-of-order-placement-numbering/269339?r=SearchResults&s=1%7C45.7398#269339 – John Kormylo Oct 04 '22 at 03:30

1 Answers1

1

You can manipulate the labels using \setcounter{subfigure}{<number>}. For example using your code

\begin{figure}
    \begin{subfigure}{.45\textwidth}
        \caption{Name me a}
        \includegraphics[width=\linewidth]{example-image-a} 
        \setcounter{subfigure}{2}   % <<<<<<<<<<<<<<<<<<<<<<<<<<<   
        \caption{Name me c}
        \includegraphics[width=\linewidth]{example-image-c}
    \end{subfigure}
    \begin{subfigure}{.55\textwidth}
        \setcounter{subfigure}{1}   % <<<<<<<<<<<<<<<<<<<<<<<<<<<   
        \caption{Name me b}
        \includegraphics[width=\linewidth]{example-image-b}
    \end{subfigure}
    \caption{example caption}
\end{figure} 

But your code does not produce the posted image.

As an alternative you can change the order of the subfigures.

The label of each subfigure is assigned by order of appearance. So for second figure it is used \begin{subfigure}[<vertical position>][<stretch the height>][position inside]{width}

The stretch was chosen manually.

b

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

\begin{document}

\begin{figure}
    \begin{subfigure}{.45\textwidth}
        \caption{Name me a}
        \includegraphics[width=\linewidth]{example-image-a}
    \end{subfigure}
    \begin{subfigure}[b][80pt][t]{.55\textwidth}
            \caption{Name me b}
            \includegraphics[width=\linewidth]{example-image-b}
        \end{subfigure} 
    \begin{subfigure}{.45\textwidth}                            
        \caption{Name me c}
        \includegraphics[width=\linewidth]{example-image-c}
        \end{subfigure}%
        \caption{example caption}
    \end{figure} 

\end{document}

Simon Dispa
  • 39,141