1

I tried quite some things but I am not able to get the rotated cells nicely centered. e.g. Patient is a bit more to the left.

  1. origin=tl to origin=tc did not work
  2. \centering did not work
  3. \begin{center}Patient\end{center} did not work either...
    \usepackage{xcolor}
    \usepackage{graphicx}
    \usepackage{tabularray}
    
    
    
    \begin{document}
      \begin{figure}
      \begin{tblr}
        {
          width     = {\textwidth},
          colspec   = { Q[c]Q[c]Q[c]Q[c] },
          rowsep = 1ex,
          rowspec   = { Q[m] },
    %      hlines,
    %      vlines,
          row{1}    = {font=\bfseries, bg=brown9, font=\sffamily},
          cell{1}{1}    = {bg=white},
          cell{2-3}{1}    = {cmd=\rotatebox[{origin=tl}]{90}},
    %      cell{3}{1}    = {cmd=\rotatebox[{origin=tl}]{90}},
        }
    &
    echo-Doppler 
    &
    CT-MRA
    &
    CTA
    \\
    \parbox{1.5cm}{Healthy subject}
    &
    \includegraphics[width=3.0cm,height=2cm]{example-image}
        & 
          \includegraphics[width=3.0cm,height=2cm]{example-image}
            &   
    \includegraphics[width=3.0cm,height=2cm]{example-image}
        \\
    Patient\ \ \ \ \ 
    &
    \includegraphics[width=3.0cm,height=2cm]{example-image}
    &
       \includegraphics[width=3.0cm,height=2cm]{example-image}
    &
       \includegraphics[width=3.0cm,height=2cm]{example-image}
            \end{tblr}
      \end{figure}
\end{document}```

1
  • Any news? Is my answer close to whar you after?
    – Zarko
    Jan 15, 2023 at 21:43

1 Answer 1

1

See, if the following solution is acceptable to you:

\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{rotating}
\usepackage{makecell}
\usepackage{xcolor}
\usepackage{tabularray}



\begin{document}
    \begin{figure}
\settowidth\rotheadsize{Healthy}
\adjustboxset{width=3cm, height=2cm,  valign=m}
\renewcommand\cellalign{cc}
\begin{tblr}{colsep=2pt,    
             colspec = {Q[c, m] 
                        Q[m, leftsep=0pt] *{2}{Q[m]} @{} },
             cell{2-Z}{1} = {cmd=\rotcell},
             cell{1}{2-Z} = {bg=brown},
             row{1}  = {c, font=\sffamily},
              }
    & echo-Doppler  & CT-MRA    & CTA   \\
{Healthy\\ subject}
    &   \adjincludegraphics{example-image-a}
        &   \adjincludegraphics{example-image-b}
            &   \adjincludegraphics{example-image-c}   \\
Patient 
    &   \adjincludegraphics{example-image-a}
        &   \adjincludegraphics{example-image-b}
            &   \adjincludegraphics{example-image-c}   \\
\end{tblr}
    \end{figure}
\end{document}

enter image description here

However you can make images slightly bigger with the following figure and table settings:

    \begin{figure}
\settowidth\rotheadsize{Healthy}
\adjustboxset{width=\linewidth,  valign=m}
\renewcommand\cellalign{cc}
\begin{tblr}{colsep=2pt,    
             colspec = {Q[c, m] 
                        Q[m, leftsep=0pt] *{2}{Q[m]} @{} },
             cell{2-Z}{1} = {cmd=\rotcell},
             cell{1}{2-Z} = {bg=brown},
             row{1}  = {c, font=\sffamily},
              }
...
\end{tblr}
    \end{figure}

enter image description here

You must log in to answer this question.

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