Implementing a 3×4 subfigure

subfloats

I would like to implement the following figure in LaTeX, including the axis labels.
(Assume that in this image matrix there are 12 individual square pictures … can I fix the size of the individual square?)

How can this be done? I have worked with the packages graphicx, subcaption and subfigure before, but I do not quite understand them well enough to do this.

The figure should have width=0.8\textwidth and go in between two text paragraphs.

Thank you for any advice.

This is how it should look:

text blablabla

enter image description here

text blablabla

Best Answer

  • One way is to put images in table, for example based on tabularray package, and in the first column and row write desired informations about images.
  • For vertical positioning of images you need to move images baselines to their vertical center. For this is sensible to use package adjustbox. - - By using it, you can also determine common settings for images.
  • For rotating of texts in the first column are used packages rotating and makecell for the \rothead command:
\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{rotating}
\usepackage{makecell}
\usepackage{tabularray}


\begin{document}
    \begin{figure}[ht]
    \settowidth\rotheadsize{merge}
\adjustboxset{width=\linewidth,valign=c}
\begin{tblr}{colsep=1pt,
             colspec = {@{} Q[c,m] *{4}{X[c]} @{} },
             cell{2-Z}{1} = {cmd=\rothead},
             rowsep  = 1pt
             }
        \centering
    & 1:0   & 1000:1    &   100:1   &   10:1            \\
mCh
    &   \adjincludegraphics{example-image-a}
        &   \adjincludegraphics{example-image-b}
            &   \adjincludegraphics{example-image-c}
                &   \adjincludegraphics{example-image}     \\
eGFP
    &   \adjincludegraphics{example-image-a}
        &   \adjincludegraphics{example-image-b}
            &   \adjincludegraphics{example-image-c}
                &   \adjincludegraphics{example-image}     \\
merge
    &   \adjincludegraphics{example-image-a}
        &   \adjincludegraphics{example-image-b}
            &   \adjincludegraphics{example-image-c}
                &   \adjincludegraphics{example-image}     \\
\end{tblr}
\caption{Caption for figure}
\label{fig:required}
    \end{figure}
\end{document}

enter image description here