1

I have two figures I would like to display in landscape on the same page. One is a normal figure, the other is made up of three subfigures.

They are currently in subfigures, to ensure that they end up on the same page.

They are as follows:

\begin{sidewaysfigure}
    \begin{subfigure}[t]{\textwidth}
        \centering
            \input{1.tikz}
        \caption{1}
        \label{fig:1}
    \end{subfigure}

    \begin{subfigure}[b]{\textwidth}
        \centering
        \begin{subfigure}[t]{0.3\textwidth}
            \input{2a.tikz}
            \caption{2a}
        \end{subfigure}
        %
        \begin{subfigure}[t]{0.3\textwidth}
            \input{2b.tikz}
            \caption{2b}
        \end{subfigure}
        %
        \begin{subfigure}[t]{0.3\textwidth}
            \input{2c.tikz}
            \caption{2c}
        \end{subfigure}
        \caption{2 global}
        \label{fig:2}
    \end{subfigure}
\end{sidewaysfigure}

With the figures separate they were numbered: Figure 1, (a), (b), (c), Figure 2.

Whereas now it is (a), ..., (e).

Is there any way to get the original numbering?

2

Some suggestions:

  • Don't overuse subfigure environments. I suggest that you replace the first subfigure environment with a minipage environment and that you leave off the second "outer" subfigure code entirely.

  • Create some vertical separation between Figure 1 and Figure 2 (a,b,c) complex with a \vspace instruction.

  • Maximize the horizontal separation between the three remaining subfigure environments with \hfill instructions.

enter image description here

% !TEX TS-program = pdflatex
\documentclass[demo]{article} % omit 'demo' option in real document
\usepackage{rotating}
\usepackage{subcaption}
\begin{document}

\begin{sidewaysfigure}
    \begin{minipage}[t]{\textwidth}
        \centering
        %\input{1.tikz}
        \includegraphics[width=0.7\textwidth]{1.jpg} % choose a suitable width
        \caption{1 global}
        \label{fig:1}
    \end{minipage}

    \vspace{1cm}

    \begin{subfigure}[t]{0.31\textwidth}
        %\input{2a.tikz}
        \includegraphics[width=\textwidth]{2a.jpg}
        \caption{2a}
    \end{subfigure}
    \hfill
    \begin{subfigure}[t]{0.31\textwidth}
        %\input{2b.tikz}
        \includegraphics[width=\textwidth]{2b.jpg}
        \caption{2b}
    \end{subfigure}
    \hfill
    \begin{subfigure}[t]{0.31\textwidth}
        %\input{2c.tikz}
        \includegraphics[width=\textwidth]{2c.jpg}
        \caption{2c}
    \end{subfigure}

    \caption{2 global}
    \label{fig:2}
\end{sidewaysfigure}
\end{document}
  • Brilliant just what I was looking for! I take it that subfigure doesn't fully encapsulate then? And that the minipage allows for the nested figures? – Cjen1 May 7 at 9:46
  • @Cjen1 - A subfigure environment is a fancy minipage environment, with one extra facility -- the ability to provide \caption and \label statements. As the upper figure ("Figure 1") may not need to span the full width of the text block, I recommend placing it in a minipage environment to facilitate horizontal centering. I'm not sure I understand what you mean by "fully encapsulating" a subfigure environment. As subfigure environments are specialized minipage environments, there's no need to encapsulate them further. – Mico May 7 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.