我有一张由多张拼接在一起的子图像组成的图像。我想为子图像添加行和列标签。我该怎么做?
\documentclass[11pt]{report}
\usepackage{graphicx} %for including eps graphics
\begin{document}
\begin{figure}
\begin{center}
\includegraphics{image.png}
\end{center}
\caption{Some text }
\end{figure}
\end{document}
本质上,我的图像与下图类似,我想添加红色文本。如果能将其text1
text2
旋转 90 度就更好了。
答案1
可能有更好的解决方案,但TikZ
你可以这样做:
\documentclass[11pt]{report}
\usepackage{graphicx} %for including eps graphics
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\node (A) {\includegraphics[width=5cm]{example-image}};
\path (A.south west) -- (A.north west) node[pos=.25, above, rotate=90] {Text 2} node[pos=.75, above, rotate=90] {Text 1};
\path (A.south west) -- (A.south east) node[pos=.25, below] {(a)} node[pos=.75, below] {(b)};
\end{tikzpicture}
\caption{Some text }
\end{figure}
\end{document}
答案2
\documentclass[11pt]{report}
\usepackage[english]{babel}
\usepackage{graphicx} %for including eps graphics
\begin{document}
\begin{figure}
\begin{minipage}{2mm}
\rotatebox{90}{\hspace{50mm}Text-1}
\end{minipage}
\begin{minipage}{2mm}
\includegraphics[scale=0.8]{1.png}
\end{minipage}
\begin{minipage}{2mm}
\vspace*{-120mm}
\rotatebox{90}{\hspace*{-25mm}Text-2}
\end{minipage}
\caption{Some text }
\end{figure}
\end{document}