%20n%C3%A3o%20est%C3%A1%20alinhada%20.png)
Estou tentando centralizar e diminuir o espaço entre quatro imagens que fazem parte de uma figura. Comandos como hspace
e \captionsetup[sub]{skip=0mm}
não fazem nada. Mover meu centro para que fique abaixo de \begin{figure} também transforma tudo em uma linha longa.
Aqui está meu segmento relevante:
\begin{center}
\begin{figure}[b]
\vspace{-45mm}
\begin{subfigure}[b]{0.6\textwidth}
\centering
\includegraphics[width=\textwidth]{Plot M37 with parameters to see more stars.png}
\vspace{-10mm}
\caption{Image of Open Cluster Messier 37}
\vspace{-1mm}
\label{fig:0}
\end{subfigure}
\begin{subfigure}[b]{0.6\textwidth}
\centering
\includegraphics[width=\textwidth]{HD23190.png}
\vspace{-10mm}
\caption{Image of Star HD23190}
\vspace{-1mm}
\label{fig:1}
\end{subfigure}
\vspace{-10mm}
\begin{subfigure}[b]{0.6\textwidth}
\centering
\includegraphics[width=\textwidth]{HD40649.png}
\vspace{-10mm}
\caption{Image of Star HD40649}
\label{fig:2}
\end{subfigure}
\vspace{-10mm}
\begin{subfigure}[b]{0.6\textwidth}
\centering
\includegraphics[width=\textwidth]{HD280264.png}
\vspace{-10mm}
\caption{Image of Star HD280264}
\label{fig:3}
\end{subfigure}
\end{figure}
\end{center}
Responder1
Neste exemplo, você pode ver algo semelhante: https://www.latetemplates.com/template/arsclassica-article
Se você tentar transpor, pode ser um código assim:
\begin{figure}[tb]
\centering
\subfloat[Image of Open Cluster Messier 37.]{\includegraphics[width=.45\columnwidth]{Plot M37 with parameters to see more stars.png}}\label{fig:0} \quad
\subfloat[Image of Star HD23190.]{\includegraphics[width=.45\columnwidth]{HD23190.png}\label{fig:1}\\
\subfloat[Image of Star HD40649.]{\includegraphics[width=.45\columnwidth]{HD40649.png}}\label{fig:2} \quad
\subfloat[Image of Star HD280264.]{\includegraphics[width=.45\columnwidth]{HD280264.png}}\label{fig:3}
\caption[Stars.]{Stars.}
\label{fig:PicturesOfStars}
\end{figure}
Responder2
- ambiente float de inserção mais recente em um ambiente fixo (como são
minipage
,center
etc.) - a soma das larguras das subfiguras em uma linha deve ser menor que a largura do texto. Caso contrário, as subimagens serão exibidas na borda direita
- nos casos em que as imagens têm a mesma largura das subfiguras, o uso do
\centering
comando nas subfiguras não faz sentido, portanto você pode eliminá-las - como todas as imagens têm a mesma largura, é útil usar
Gin
a tecla para determinar suas larguras, - com a opção subfigura
[b]
são alinhadas verticalmente na parte inferior das legendas das subfiguras, isto no caso se uma das legendas tiver mais linhas que outras faz com que o topo das imagens não esteja alinhado - se você usar
\hfill
o espaço horizontal entre as imagens, as imagens serão separadas pelas bordas esquerda e direita do texto
Considerando o mencionado acima, o MWE com código de suas imagens pode ser:
\documentclass{article}
\usepackage{graphicx}
\usepackage[skip=0.5ex, belowskip=1ex]{subcaption}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\begin{figure}[htb]
\setkeys{Gin}{width=\linewidth}
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics{example-image-duck}%{Plot M37 with parameters to see more stars.png}
\caption{Image of Open Cluster Messier 37}
\label{fig:0}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics{example-image-duck}%{HD23190.png}
\caption{Image of Star HD23190}
\label{fig:1}
\end{subfigure}
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics{example-image-duck}%{HD40649.png}
\caption{Image of Star HD40649}
\label{fig:2}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.48\textwidth}
\includegraphics{example-image-duck}%{HD280264.png}
\caption{Image of Star HD280264}
\label{fig:3}
\end{subfigure}
\end{figure}
\end{document}
(as linhas vermelhas mostram parte do layout da página)