What is the purpose of vspace here? \begin{figure*}[t] \centering…
- User
What is the purpose of vspace here?
\begin{figure*}[t] \centering \begin{minipage}[b]{0.4\linewidth} \includegraphics[width=\linewidth]{latex/belief_histogram_of_dtw_distance_for_taxonomy.pdf} \label{fig:sub1} \end{minipage} % \hspace{0.005\linewidth} % Slightly reduced space between the images \begin{minipage}[b]{0.4\linewidth} \includegraphics[width=\linewidth]{latex/practice_histogram_of_dtw_distance_for_taxonomy.pdf} \label{fig:sub2} \end{minipage} \vspace{-0.6cm} \caption{DTW distance distributions of trajectory pairs: the left plot represents belief and the right practice. Blue indicates pairs with the same structures, and red indicates pairs with different structures. The distribution for identical structures is shifted toward smaller DTW distance values. } \label{fig:dtw_distributions} \end{figure*}
- Assistant
In your snippet, latexCopy code\vspace{-0.6cm}
is adding vertical space between the content of the figure* (your two minipages with histograms) and the \caption{...}.
Without it, LaTeX automatically inserts some vertical gap before the caption.
By using a negative vspace, you’re pulling the caption closer upward toward the figures, reducing that default gap.
So the purpose here is purely layout adjustment: tightening the spacing so the caption sits closer to the plots. 👉 If you remove it, the caption will likely sit lower, leaving more whitespace. Do you want me to show you cleaner alternatives to manually forcing \vspace{-0.6cm} (e.g., using \captionsetup{skip=...} from the caption package)?