0

I am new to latex, I am writing a report that includes a lot of images. I cant get the space between the figures to reduce. I have included my code. Someone please tell me what I can do to reduce spaces between figures and insert text instead.

\documentclass[a4paper]{jpconf}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\setlength{\intextsep}{1pt plus 1.0pt minus 1.0pt}
\begin{document}

\begin{abstract}

\end{abstract}

\section{Results}

Discriminator Calibration Curves
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
 \includegraphics[width=8.5cm]{Plot_1.png}
 \vspace{-10.5mm}
    \caption{Calibration curve of discriminator for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=8.5cm]{Plot_2.png}
 \vspace{-10.5mm}
    \caption{\small{Calibration curve of discriminator for gamma detector}}
\end{minipage}
\end{figure}
\setlength{\floatsep}{1pt}
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
 \includegraphics[width=8.5cm]{Plot_3.png}
  \vspace{-10.5mm}
    \caption{Calibration curve of multipulser for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=8.5cm]{Plot_4.png}
 \vspace{-10.5mm}
    \caption{\small{Calibration curve of multipulser for gamma detector}}
\end{minipage}
\end{figure}

\setlength{\floatsep}{1pt}
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
 \includegraphics[width=8.5cm]{Plot_5.png}
 \vspace{-10.5mm}
    \caption{Pulse height spectrum for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=8.5cm]{Plot_6.png}
 \vspace{-10.5mm}
    \caption{\small{Pulse height spectrum for gamma detector}}
\end{minipage}
\end{figure}
\end{document}
1
  • 1
    we can not run your example so can not see the issue (try to show the problem using example-image which is available for tests. But you should remove the \setlength{\floatsep}{1pt} settings, that is a global document level parameter that controls how figures are inserted into the page, it can not be set within the page with different values for each figure. Nov 22 '20 at 17:50
0

Is this the kind of output you want? I just commented few lines of your code and added the example-image-A test figures as the comment above suggested.

output

This is the code.

%\documentclass[a4paper]{jpconf}

\documentclass[a4paper]{article} % changed
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}

\usepackage{kantlipsum} %% dummy text added

%\setlength{\intextsep}{1pt plus 1.0pt minus 1.0pt}
\begin{document}

\begin{abstract}

\end{abstract}

\section{Results}

\textbf{Discriminator Calibration Curves}

\kant[1]

\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
 \includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-A}
% \vspace{-10.5mm}
    \caption{Calibration curve of discriminator for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-B}
% \vspace{-10.5mm}
    \caption{\small{Calibration curve of discriminator for gamma detector}}
\end{minipage}
\end{figure}

\kant[2]

%\setlength{\floatsep}{1pt}
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
 \includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-A}
%  \vspace{-10.5mm}
    \caption{Calibration curve of multipulser for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-B}
% \vspace{-10.5mm}
    \caption{\small{Calibration curve of multipulser for gamma detector}}
\end{minipage}
\end{figure}

\kant[3]

%\setlength{\floatsep}{1pt}
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-A}
% \vspace{-10.5mm}
    \caption{Pulse height spectrum for alpha detector}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width= 0.45\linewidth, keepaspectratio]{example-image-B}
% \vspace{-10.5mm}
    \caption{\small{Pulse height spectrum for gamma detector}}
\end{minipage}
\end{figure}
\end{document}
1
  • Hi! yes this is exactly what I was looking for. Thank you so much for your help! Nov 24 '20 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.