我制作了一个显示 2x3 图像的图形。但是,我希望整个图形(标题除外)旋转 90 度。这是我尝试通过“rotatebox”命令调整的代码:
\begin{figure}[]
\centering
\rotatebox{90} {
\subfigure[]{\includegraphics[width=0.34\textwidth]{a.pdf}}
\subfigure[]{\includegraphics[width=0.32\textwidth]{b.pdf}}
\subfigure[]{\includegraphics[width=0.28\textwidth]{c.pdf}}
\subfigure[]{\includegraphics[width=0.32\textwidth]{d.pdf}}
\subfigure[]{\includegraphics[width=0.33\textwidth]{e.pdf}}
\subfigure[]{\includegraphics[width=0.32\textwidth]{f.pdf}}
}
\caption{ myCaption
}
\end{figure}
上述代码显示旋转的图片,仅对齐 1 列,一张接一张。我尝试在 c.pdf 后放置“\\”,但它报告错误“缺少某些内容”。如何获得旋转 90 度的 2x3 图形?
答案1
尝试一次旋转三幅图像:
\documentclass[11pt]{article}
\usepackage[demo]{graphicx}
\usepackage{subfigure}
%
\begin{document}
%
\begin{figure}[]
\centering
\rotatebox{90} {%
\subfigure[]{\includegraphics[width=0.34\textwidth]{a.pdf}}
\subfigure[]{\includegraphics[width=0.32\textwidth]{b.pdf}}
\subfigure[]{\includegraphics[width=0.28\textwidth]{c.pdf}}
}%
\rotatebox{90} {%
\subfigure[]{\includegraphics[width=0.32\textwidth]{d.pdf}}
\subfigure[]{\includegraphics[width=0.33\textwidth]{e.pdf}}
\subfigure[]{\includegraphics[width=0.32\textwidth]{f.pdf}}
}%
\caption{myCaption}
\end{figure}
\end{document}
注意:不要使用subfigure
,最好使用subfig
包。
答案2
可能最简单的是
\rotatebox{90}{\begin{tabular}{ll}
\includegraphics{}&\includegraphics{}\\
\includegraphics{}&\includegraphics{}\\
\includegraphics{}&\includegraphics{}\end{tabular}}
\caption{...}
答案3
您不应该使用过时的软件包subfigure
,而subfig
应该使用\subfloat
命令。
\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx} % [demo] is just for demo purposes
\begin{document}
\begin{figure}
\centering
\rotatebox{90} {%
\begin{minipage}{12cm} % choose the size you prefer
\centering
\subfloat[]{\includegraphics[width=0.34\textwidth]{a.pdf}}\,
\subfloat[]{\includegraphics[width=0.32\textwidth]{b.pdf}}\,
\subfloat[]{\includegraphics[width=0.28\textwidth]{c.pdf}}\\
\subfloat[]{\includegraphics[width=0.32\textwidth]{d.pdf}}\,
\subfloat[]{\includegraphics[width=0.33\textwidth]{e.pdf}}\,
\subfloat[]{\includegraphics[width=0.32\textwidth]{f.pdf}}
\end{minipage}}
\caption{myCaption}
\end{figure}
\end{document}
问题在于它\rotatebox
不允许换行;添加一个小页面可以解决这个问题。