1

I want to add A, B, C... on the top and one, two, three on the left

I want to add A, B, C... on the top and one, two, three on the left follow is my code:

\begin{figure*}[ht]
\centering
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5a1.png}
    \label{fig5a1}}
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5b1.png}
    \label{fig5b1}} 
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5c1.png}
    \label{fig5c1}}
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5d1.png}
    \label{fig5d1}} \\
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5a2.png}
    \label{fig5a2}}
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5b2.png}
    \label{fig5b2}} 
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5c2.png}
    \label{fig5c2}}
\subfloat[]{\includegraphics[width=0.22\columnwidth]{fig5d2.png}
    \label{fig5d2}}     
           \caption{picture}
\label{fig5}

\end{figure*}

1 Answers1

0

enter image description here

\documentclass[twocolun]{article}

\usepackage{adjustbox} % it load graphicx package too \usepackage[skip=0.5ex, belowskip=1ex]{subcaption}

\usepackage{rotating, tabularx} \newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document} \begin{figure}[ht] \centering \adjustboxset{width=\linewidth,valign=c, margin=0pt 3pt 0pt 3pt} \begin{tabularx}{\linewidth}{@{} c CCCC @{}} & A & B & C & D \ \rotatebox{90}{\qquad one} & \subfloat[\label{fig5a1}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5b1}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5c1}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5d1}]{\adjincludegraphics{example-image-duck}} \
\rotatebox{90}{\qquad two} & \subfloat[\label{fig5a2}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5b2}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5c2}]{\adjincludegraphics{example-image-duck}} & \subfloat[\label{fig5d2}]{\adjincludegraphics{example-image-duck}} \ \end{tabularx} \caption{picture} \label{fig5} \end{figure
} \end{document}

Zarko
  • 296,517