3

enter image description here

As the title says, i'm trying to compile 13 images into one page.

I've tried multiple options, but none seem to work. Ideally the legend would be next to the other images on the side rather than part of the table but i wasn't able to do this.

In addition, they do not fit on the page... Any suggestions? Currently, i'm resorting to using a compiled version from pptx but this has weird borders that are only visible after downloading the pdf (resolving this could also be an option!)

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}

     \begin{figure}[H]
    \centering 
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{Model A}
\end{subfigure}\hfil 
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=\linewidth]{example-image-b}
  \caption{}
\end{subfigure}\hfil 
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=\linewidth]{example-image-c}
  \caption{}
\end{subfigure}\hfil 

\medskip
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{Model B}
\end{subfigure}\hfil 
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=\linewidth]{example-image-a}
  \caption{}
\end{subfigure}\hfil 
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=\linewidth]{example-image-a}
  \caption{}
\end{subfigure}\hfil 
\medskip
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{Model C}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{}
\end{subfigure}
\begin{subfigure}{0.3\textwidth}
  \includegraphics[height=\textwidth]{example-image-a}
\end{subfigure}
%\begin{subfigure}{0.3\textwidth} % here idealy nothing with the previous two lined up with those above 
%\includegraphics[height=\textwidth]{example-image-9x16} %where to put legend... ideallky on the side not here. 
%\end{subfigure}

\medskip

\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{Model D}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}\hfil

\medskip

\begin{subfigure}{0.3\textwidth}
  \includegraphics[width=0.8\linewidth]{example-image-a}
  \caption{model E}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
 \includegraphics[width=\linewidth]{example-image-a}
  \caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}

%here ideally nothing also with previous two lined up with those above only the one with
      \caption{}
    \end{subfigure}\hfil
    \caption{caption}
    \end{figure}
\end{document}
Mensch
  • 65,388
Louise
  • 31
  • Thanks!! (sorry you can definitely tell the newness! ). i would love to do this, but i'm not sure exactly how/what to do... – Louise Mar 05 '19 at 06:34

1 Answers1

4
  • your figure can be fitted on one page only if you made images heights smaller or use different page layout as you show in your mwe) or spliting images into two parts and than use \ContinuedFloat option from caption packages. how to use it is described in this answer (see the pšossible split of your figure in the second mwe below)
  • for placement if figure use [htbp] instead of H or as shown in the second mwe below
  • it is not clear why you not use equal width for all images (in the first column are narrowed)
  • i would define width of images with width of subfigure environments and than use Gin for defining widths of included images

  • first mwe:

    \documentclass{article}
    \usepackage[demo]{graphicx}
    \usepackage{caption,subcaption}
    
    %---------------- show page layout. don't use in a real document!
    \usepackage{showframe}
    \renewcommand\ShowFrameLinethickness{0.15pt}
    \renewcommand*\ShowFrameColor{\color{red}}
    %---------------------------------------------------------------%
    
    \begin{document}
        \begin{figure}[htbp]
        \centering
        \setkeys{Gin}{width=\linewidth}
    \begin{subfigure}{0.24\textwidth}
      \includegraphics{Pic/cross_orig.png}
      \caption{Model A}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/orig_stress_with_calc.png}
      \caption{}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/orig_stress.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.24\textwidth}
      \includegraphics{Pic/calc_lip_swap_material.png}
      \caption{Model B}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/ModelB_stress.png}
      \caption{}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/Model_B_stress_without.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.24\textwidth}
      \includegraphics{Pic/ModelC_material.png}
      \caption{Model C}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/modelC_stress.png}
      \caption{}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \hfill there will be included a legend %\includegraphics[width=0.8\linewidth]{Pic/legend.png}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.24\textwidth}
      \includegraphics{Pic/ModelD_material.png}
      \caption{Model D}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/ModelD_stress_with.png}
      \caption{}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
    \includegraphics{Pic/ModelD_stress_without.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.24\textwidth}
      \includegraphics{Pic/ModelE_material.png}
      \caption{model E}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/modelE_stress.png}
      \caption{}
    \end{subfigure}\hfil
    \begin{subfigure}{0.3\textwidth}
      \includegraphics{Pic/ModelE_stress_without.png}
      \caption{}
    \end{subfigure}
    \caption{all 5 model variations blah blh}
    \end{figure}
    \end{document}
    

enter image description here

(red lines indicate page layout)

as you can see from above mwe, it differ from your code only in small details ... (placement of \hfil. added missing \caption using subcaption packed for sub figures.

  • second mwe:

    \documentclass{article}
    \usepackage[demo]{graphicx}
    \usepackage{caption,subcaption}
    
    %---------------- show page layout. don't use in a real document!
    \usepackage{showframe}
    \renewcommand\ShowFrameLinethickness{0.15pt}
    \renewcommand*\ShowFrameColor{\color{red}}
    %---------------------------------------------------------------%
    \usepackage{lipsum}
    
    \begin{document}
    \lipsum[66]
        \begin{figure}[!b]
        \setkeys{Gin}{width=\linewidth}
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/cross_orig.png}
      \caption{Model A}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/orig_stress_with_calc.png}
      \caption{}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/orig_stress.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/calc_lip_swap_material.png}
      \caption{Model B}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelB_stress.png}
      \caption{}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/Model_B_stress_without.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelC_material.png}
      \caption{Model C}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/modelC_stress.png}
      \caption{}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \hfill there will be included a legend %\includegraphics[width=0.8\linewidth]{Pic/legend.png}
    \end{subfigure}
    \caption{all 5 model variations blah blh (first part)}
    \end{figure}
    
    \begin{figure}[!ht]
        \setkeys{Gin}{width=\linewidth}
        \ContinuedFloat
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelD_material.png}
      \caption{Model D}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelD_stress_with.png}
      \caption{}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
    \includegraphics{Pic/ModelD_stress_without.png}
      \caption{}
    \end{subfigure}
    
    \medskip
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelE_material.png}
      \caption{model E}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/modelE_stress.png}
      \caption{}
    \end{subfigure}\hfill
    \begin{subfigure}{0.32\textwidth}
      \includegraphics{Pic/ModelE_stress_without.png}
      \caption{}
    \end{subfigure}
    \caption{all 5 model variations blah blh (second part)}
    \end{figure}
    \lipsum[1-3]
    \end{document}
    

enter image description here

Zarko
  • 296,517