0

My aim is to increase or decrease the vertical spacing between figures inside the same figure environment. I have tried the subcaptions package and the commands vspace and vspace*, but they did not work. A working example follows below(I included all of the preamble):

\documentclass[12pt,oneside,notitlepage,abstracton,a4paper,demo]{scrartcl} %Draft mode for seeing overflow, underflow
%\documentclass[draft]{article} % Familiar old article class
\usepackage[utf8]{inputenc} % Encoding
\usepackage{epsfig}
\usepackage{scrpage2}
\usepackage{graphicx}
\usepackage[usenames, dvipsnames]{color}
\usepackage[linkcolor=blue, citecolor=red, urlcolor=blue]{hyperref} %References inside the document
\usepackage{hypcap} % Right anchoring for floats
\usepackage{siunitx} % SI units
\usepackage{amsmath, amsfonts, amssymb} % American Mathematical Society 
\usepackage[english]{babel} 
\usepackage[nottoc]{tocbibind}
\usepackage[tmargin=2.5cm, bmargin=2.5cm, lmargin=2.5cm, rmargin=2.5cm]{geometry}
\usepackage{float}
\usepackage{morefloats}
\usepackage{subfigure}
\usepackage{subfigure}
\usepackage{mathrsfs}
\usepackage{xfrac}
\usepackage{needspace} 
\usepackage{wrapfig} % Wrapping figure, tables around text
\usepackage{cancel} % MET E in this case
\usepackage{multirow} % Table entries spanning multiple rows/columns
\usepackage{booktabs}
\usepackage{rotating} % For sideways environment
\hypersetup{colorlinks=true}
%\geometry{tmargin=2.5cm, bmargin=2.5cm, lmargin=2.5cm, rmargin=2.5cm}
\setcounter{secnumdepth}{3}
\setlength{\parindent}{0em}
\setlength{\parskip}{0ex plus0.5ex minus0ex}
\pagestyle{scrheadings}
\bibliographystyle{unsrt}   
\renewcommand{\headfont}{\normalfont}
\cfoot{\pagemark}
\begin{document}
\begin{figure}[H]
    \centering
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/CF.png}}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/CF.png}}
    %vspace does not work here
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/hNlep.png}}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/hNlep.png}}
\end{figure}
%vspace works here
\begin{figure}[H]
    \centering
    \includegraphics[width=.45\textwidth]{300PLOTS50/CF.png}
    \includegraphics[width=.45\textwidth]{300PLOTS140/CF.png}
    \includegraphics[width=.45\textwidth]{300PLOTS50/hNlep.png}
    \includegraphics[width=.45\textwidth]{300PLOTS140/hNlep.png}
\end{figure}
\end{document}
Vesnog
  • 1,307
  • 2
  • 15
  • 30

1 Answers1

1

You do not have a paragraph break for the spacing. How does the below work?

\begin{centering}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/CF.png}}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/CF.png}}\\
  \vspace*{1cm}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS50/hNlep.png}}
    \subfigure{\includegraphics[width=.45\textwidth]{300PLOTS140/hNlep.png}}
\end{centering`}
Nigel
  • 1,221
  • Thanks it worked, this is the solution I was seeking. Can you also explain why this works? – Vesnog Sep 10 '14 at 09:08
  • I glad it worked. Don't take this as authoritative, I'm partially guessing. That said, it appears your original layout had all four figures in the one paragraph, sort of acting like words in a paragraph. You can't put vertical space between words. By breaking them, you have a place where you can add vertical space. – Nigel Sep 10 '14 at 09:10
  • Okay thanks for that, and I guess that if I want to use captions for the figures I need to use the subcaption package together with the subfigure environment inside a figure environment`. I tried putting captions inside paragraph boxes, but they were not aligned with the graphics. – Vesnog Sep 10 '14 at 09:41