[Tex/LaTex] How to reduce the space between the y-axis label and the plots

graphs

Please I need some one to help me out with this issue.
I have been able to add common axes labels to two plots I made with excel successfully. Now the problem I have is that the class file (name cit_thesis11 and approved by my university) I currently use puts extra distance between the y-axis and my graphs when I centralize the plots with the axis labels and caption. The distance is normal when I use the report or article class. What code set can I use in my tex file or class file to reduce this distance. I have included two figures to show the latex outputs when I use my class file and the report class. I have also included a working extract of my code.

enter image description here
enter image description here

%\documentclass[12pt,draft]{report}
\documentclass[12pt,draft]{cit_thesis11}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{xcolor}

\newsubfloat{figure}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{minipage}{0.5cm}
\centering
\rotatebox{90}{\textcolor{red}{Y--axis label}}
\end{minipage}%
\begin{minipage}{\dimexpr\linewidth-2.50cm\relax}%
\centering
  \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho1.eps}}\ \subfloat[\label{label1}]{} \\
  \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho1.eps}}\ \subfloat[\label{label2}]{}

  \vspace*{0.1cm}\textcolor{red}{X--axis label}
  \caption{This is the text that describes \protect\subref{label1} and \protect\subref{label2}.}
\end{minipage}%
\end{figure}
\end{document}

Best Answer

First a question, are you married to using scale=0.4 (you could force the width of the image using width=...).

Here I've taken some liberties with your formatting:

\documentclass[12pt,draft]{cit_thesis11}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{xcolor}
\usepackage{calc}
\newsubfloat{figure}
\pagestyle{empty}
\begin{document}
\begin{figure}[!ht]
    {\begin{minipage}{\dimexpr\linewidth-2.50cm+0.5cm}
        \centering
        \rotatebox{90}{\makebox[0pt]{\textcolor{red}{Y-axis label}}}
        {\begin{minipage}{6.5cm+1cm}%
            \raisebox{\dimexpr-.5\height-1em}{\includegraphics[width=6.5cm]{Figures/knockho1.eps}}\ \subfloat[\label{label1}]{} \\
            \raisebox{\dimexpr-.5\height-1em}{\includegraphics[width=6.5cm]{Figures/knockho1.eps}}\ \subfloat[\label{label2}]{}

            %% use hspace to center the x-axis lable and then add some space at the end for the subfloat labels.
            \vspace*{0.1cm}\hspace*{\fill}\textcolor{red}{X-axis label}\hspace*{\fill}\hspace*{0.5cm}
        \end{minipage}}%
        \caption{This is the text that describes \protect\subref{label1} and \protect\subref{label2}.}
    \end{minipage}}
\end{figure}
\end{document}

which renders

enter image description here

There are some surrounding parentheses about the boxes. They are not necessary, but I left them there so you can easily put in an \fbox at the beginning of each to see how the boxes themselves look.

Some other things I've changed:

I use the calc package. This makes managing the widths of the minipages a bit easier. I've taken the centering out of the inner-most minipage because that's part of what's creating the undesirable excess space. I've allowed 1cm for the subfigure labels (may not be enough). I've then inserted the same space at the end of the line for defining the x-axis label to give the appearance of the x-axis label being centered under the graphs.

The \centering in the minipage for the y-axis label is not necessary. In fact that entire minipage is not necessary. So, I've placed the y-axis label inside a makebox which I've specified to have zero width. Then I rotate it. This ensures that it will be centered on the box containing the two graphics (though that box also contains the x-axis label). Also, I've corrected your hyphenation. In fact, you could add some dummy space at the beginning of the makebox as in

\rotatebox{90}{\makebox[0pt]{\textcolor{red}{\rule{1\baselineskip}{0pt}Y-axis label}}}

which will better center the y-axis label to the two figures.