如果需要将整个页面旋转,可以采用rotfloat宏包进行,该部分可参考 LaTex rotfloat宏包旋转页面
如果仅需局部调整,可采用adjustbox进行,举例如下。
\begin{figure}[h!]
\begin{adjustbox}{addcode={
\begin{minipage}{\width}}{
\caption{AAAA}
\end{minipage}},rotate=90,center}
\includegraphics[width=9.5 in]{fig2.pdf}%
\label{fig2}
\end{adjustbox}
\end{figure}