Graphics, Figures & Tables ⇒ problem with space between figures
problem with space between figures
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
problem with space between figures
It depends on how you are doing it. If you end the line or the paragraph normally, LaTeX doesn't insert additional space. If you let LaTeX justify left and right margin, LaTeX can insert space to fully fill the page width. Or do you use a package such as
subfigure
, subfig
, or subcaption
, or use minipage
or \parbox
for positioning?Please post your code, otherwise we cannot say what produces that space.
Stefan
problem with space between figures
my code was the following:
Code: Select all
\documentclass[nopreprint,times,3p,final]{elsarticle}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{graphicx,subcaption}
\usepackage{epsf}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{float}
\usepackage{subfig}
\usepackage{booktabs}
\usepackage{subcaption}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{1sz500AvgBySizeUj.eps}
\caption{}
\label{fig:q000001}
\quad
\quad
\end{subfigure} %
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{2sz500AvgBySizeUj.eps}
\caption{}
\label{fig:q11}
\quad
\quad
\end{subfigure}%
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth, angle=270]{3sz500AvgBySizeUj.eps}
\caption{}
\label{fig:q21}
\quad
\quad
\end{subfigure}%
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.4\linewidth, angle=270]{4sz500AvgBySizeUj.eps}
\caption{}
\label{fig:q31}
\quad
\quad
\end{subfigure}
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{41sz500Avg5.eps}
\caption{}
\label{fig:q411}
\quad
\quad
\end{subfigure}%
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{42sz500Avg5.eps}
\caption{}
\label{fig:q4211}
\quad
\quad
\end{subfigure}%
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{43sz500Avg5.eps}
\caption{}
\label{fig:q4311}
\quad
\quad
\end{subfigure}%
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=.5\linewidth]{44sz500Avg5.eps}
\caption{}
\label{fig:q4411}
\quad
\quad
\end{subfigure}
\caption{Distribution from $q=0.000001$ to $q=0.44$}
\label{fig:q000001q44}
\end{figure}
\end{document}
Code: Select all
\begin{figure}
\centering
\subcaptionbox{q=0.1}{\includegraphics[width=0.20\textwidth]{1sz500AvgBySizeUj.eps}}%
\label{fig:q1}
\hfill
\subcaptionbox{q=0.2}{\includegraphics[width=0.20\textwidth]{2sz500AvgBySizeUj.eps}}%
\label{fig:q2}
\hfill
\subcaptionbox{q=0.3}{\includegraphics[width=0.20\textwidth, angle=270]{3sz500AvgBySizeUj.eps}}%
\label{fig:q3}
\hfill
\subcaptionbox{q=0.4}{\includegraphics[width=0.20\textwidth, angle=270]{4sz500AvgBySizeUj.eps}}%
\label{fig:q4}
\caption{Distribution from $q=0.1$ to $q=0.4$}
\end{figure}
I want to put litle figures, 4 in a line and more lines, in some places I have to insert 8, 12 or 16 figures, so 2,3 or for lines are needed.
Thanks a lot,
Virag
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
problem with space between figures
\par
when you want to jump to the next line. It introduces a new paragraph.problem with space between figures
Virag