![我想在顶部和左侧的子图上添加标签,我该怎么做?](https://linux22.com/image/438640/%E6%88%91%E6%83%B3%E5%9C%A8%E9%A1%B6%E9%83%A8%E5%92%8C%E5%B7%A6%E4%BE%A7%E7%9A%84%E5%AD%90%E5%9B%BE%E4%B8%8A%E6%B7%BB%E5%8A%A0%E6%A0%87%E7%AD%BE%EF%BC%8C%E6%88%91%E8%AF%A5%E6%80%8E%E4%B9%88%E5%81%9A%EF%BC%9F.png)
我想在顶部添加 A、B、C...,在左侧添加一、二、三,以下是我的代码:
\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}
\结束{图*}
答案1
\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}