[Tex/LaTex] Rotate a large image and its caption

floatsrotating

I rotated a figure with landscape but the caption did not rotate as the figure. I would like the caption to be oriented like the figure. Thank you. PS: I use PDFlatex to compile the document.

\documentclass[twoside,b5paper,12pt,fleqn]{psd_thesis}
\usepackage{amsmath,amssymb,amsfonts}           \usepackage[T1]{fontenc}
\usepackage{newtxmath,newtxtext}                
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{array}

\begin{document}

\begin{landscape}
\begin{sidewaysfigure}
\centering
\includegraphics[width=0.48\textwidth, width=200mm, angle=90]{IM_corr.jpg}
\caption{Intensity measure correlation}
\label{fig:IMs matrix correlation}
\end{sidewaysfigure}
\end{landscape}%}

\end{document}

The psd_thesis.cls is reported below:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{psd_thesis}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

\ProcessOptions

\LoadClass{report}

\renewcommand{\baselinestretch}{1.5}  % Double-spaced

\usepackage[round]{natbib}  % bib style

%\usepackage[tx]{sfmath}      % a package of fonts
%\usepackage{helvet}             % For Helvetica (Arial is just a bad copy of Helvetica)
%\renewcommand\familydefault{\sfdefault}  

\renewcommand{\@makechapterhead}[1]{%
\vspace*{50\p@}%  {\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\large \scshape \bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\large \bfseries #1\par\nobreak
\vskip 40\p@  }}

\renewcommand{\@makeschapterhead}[1]{%
\vspace*{50\p@}%{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\large \scshape \bfseries  #1\par\nobreak
\vskip 40\p@  }}  

\renewcommand{\section}{\@startsection{section}% % the name{1}% % the level{0mm}% % the indent{3.0\baselineskip}% % the before skip{2.5\baselineskip}%    % the after skip{\normalfont \normalsize}} % the style

\renewcommand{\subsection}{\@startsection{subsection}% % the name
{2}% % the level{0mm}% % the indent{-\baselineskip}% % the before  skip{1.5\baselineskip}% % the after skip{\normalfont \normalsize}} % the style

\endinput

Best Answer

You have mess of rotation ... you should simply do the following:

\documentclass[twoside,b5paper,12pt,fleqn]{book}
\usepackage[T1]{fontenc}
\usepackage{rotating}
\usepackage{graphicx} 

\usepackage{showframe}

\begin{document}

    \begin{sidewaysfigure}
\centering
\includegraphics[width=0.9\textheight,height=0.5\textwidth]{example-image}
\caption{Intensity measure correlation}
\label{fig:IMs matrix correlation}
    \end{sidewaysfigure}

\end{document}

enter image description here

Edit: Some remarks about your MWE:

  • please in preamble load only relevant packages, all others had to be omitted
  • for images use example-image from graphicx package. It is available to all who like to help you (we haven't your actual image)
  • function of landscape and sidevaysfigure are similar: both enable to how page content in portrait orientation, i.e. content encapsulate in it hadn't be rotated again.
  • if you prefer landscape (I newer use it, so I haven't experience with it) than don't use sidewaysfigure inside it.
  • to my experience use of sidewaysfigure is simple and robust, so my proposed solution use it :-)