图片上文本定位问题

图片上文本定位问题

在此处输入图片描述

我想在图像顶部添加文字,以下是我的代码,我该怎么做?

\documentclass[journal]{IEEEtran} 
\ifCLASSINFOpdf 
\else 
  \usepackage[dvips]{graphicx} 
\fi 
\ifCLASSOPTIONcompsoc 
  \usepackage[caption=false,font=normalsize,labelfon t=sf,textfont=sf]{subfig} 
\else 
  \usepackage[caption=false,font=footnotesize]{subfig} 
\fi 
\usepackage{url} 
\hyphenation{op-tical net-works semi-conduc-tor} \usepackage{graphicx} 
\usepackage{cite} 
\usepackage{adjustbox}

\begin{document}
\begin{figure*}[ht]
\centering
\rotatebox{90}{\qquad{case 1}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5a1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5b1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5c1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5d1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5e1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5f1.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5g1.png}} \\
\rotatebox{90}{\qquad{case 2}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5a2.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5b2.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5c2.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5d2.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5e2.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5f2.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5g2.png}} \\
\rotatebox{90}{\qquad{case 3}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5a3.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5b3.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5c3.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5d3.png}} 
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5e3.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5f3.png}}
\subfloat[]{\adjincludegraphics[width=0.22\columnwidth]{fig5g3.png}} \\
\caption{picture}
\label{fig5}

\end{figure*}
\end{document}

答案1

在此处输入图片描述

\documentclass[journal]{IEEEtran} 
\usepackage[caption=false,font=footnotesize]{subfig} 
\usepackage{graphicx} 
\usepackage[export]{adjustbox}

\begin{document}

\begin{figure*}[ht]
\adjustboxset*{width=0.22\columnwidth, valign=c}
\centering
\setlength{\tabcolsep}{0pt}
\begin{tabular}{c@{\hspace{6pt}}*{7}{c}}
& A & B & C & D & E & F & G \\
\rotatebox[origin=c]{90}{case 1}&
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} & 
\subfloat[]{\adjincludegraphics{example-image}} & 
\subfloat[]{\adjincludegraphics{example-image}}  \\[35pt]
\rotatebox[origin=c]{90}{case 2}&
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} & 
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}}  \\[35pt]
\rotatebox[origin=c]{90}{case 3}&
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} & 
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}} &
\subfloat[]{\adjincludegraphics{example-image}}  \\
\end{tabular}
\caption{picture}
\label{fig5}
\end{figure*}

\end{document}

相关内容