TransWikia.com

Vertical Spacing between figures

TeX - LaTeX Asked by Ritu Kelkar on June 16, 2021

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.45linewidth}
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.45linewidth}
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.45linewidth}
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.45linewidth}
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.45linewidth}
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.45linewidth}
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}

One Answer

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.45linewidth}
centering
 includegraphics[width= 0.45linewidth, keepaspectratio]{example-image-A}
% vspace{-10.5mm}
    caption{Calibration curve of discriminator for alpha detector}
end{minipage}
hspace{0.5cm}
begin{minipage}[b]{0.45linewidth}
centering
includegraphics[width= 0.45linewidth, 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.45linewidth}
centering
 includegraphics[width= 0.45linewidth, keepaspectratio]{example-image-A}
%  vspace{-10.5mm}
    caption{Calibration curve of multipulser for alpha detector}
end{minipage}
hspace{0.5cm}
begin{minipage}[b]{0.45linewidth}
centering
includegraphics[width= 0.45linewidth, 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.45linewidth}
centering
includegraphics[width= 0.45linewidth, keepaspectratio]{example-image-A}
% vspace{-10.5mm}
    caption{Pulse height spectrum for alpha detector}
end{minipage}
hspace{0.5cm}
begin{minipage}[b]{0.45linewidth}
centering
includegraphics[width= 0.45linewidth, keepaspectratio]{example-image-B}
% vspace{-10.5mm}
    caption{small{Pulse height spectrum for gamma detector}}
end{minipage}
end{figure}
end{document}

Correct answer by Simon Dispa on June 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP