Estou tendo alguns problemas ao tentar exibir várias figuras alinhadas horizontalmente em uma mesma linha, estou usando os seguintes comandos do LaTeX e obtenho a seguinte figura fora do lugar:
\usepackage{caption}
\usepackage{subcaption}
\begin{figure}
\centering
\begin{subfigure}[a]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Profit_RandCA_Library_KPI_19_31181_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Weight_RandCA_Library_KPI_19_31181_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[c]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Profit_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:f}
\end{subfigure}
\hfill
\begin{subfigure}[d]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Weight_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[e]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Profit_RandCA_Library_KPI_60_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[f]{0.125\textwidth}
\centering
\includegraphics[width=\textwidth]{Boxplot_Weight_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\caption{Six simple graphs}
\label{fig:three graphs}
\end{figure}
Responder1
Parece que você está procurando o seguinte:
Como mencionado @Miyase em seu comentário, você entendeu mal o significado das opções de subfiguras. Thea são importantes para sua colocação: t
(para cima), c
(para meio) e b
(para baixo). Os rótulos de legenda são definidos por \caption
comando e o padrão são letras alfabéticas minúsculas a, b, c, etc. redefinidas em cada figure
(ou table
) float.
Portanto, o MWE da sua figura deve ser:
\documentclass{article}
\usepackage[font=small]{subcaption}
\usepackage{graphicx}
\begin{document}
\begin{figure}[ht]
\setkeys{Gin}{width=\linewidth}
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Profit_RandCA_Library_KPI_19_31181_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Weight_RandCA_Library_KPI_19_31181_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Profit_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:f}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Weight_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Profit_RandCA_Library_KPI_60_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.15\textwidth}
\includegraphics{example-image-duck}%{Boxplot_Weight_RandCA_Library_KPI_40_100000_Rules_8_Size_3.png}
\caption{}
\label{fig:}
\end{subfigure}
\caption{Six simple graphs}
\label{fig:three graphs}
\end{figure}
\end{document}
Responder2
Você pode definir o primeiro parâmetro subcaptionbox
como vazio se não precisar de sublegenda, como \subcaptionbox{}{\includegraphics[width=.125\linewidth]{example-image}}
.
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\subcaptionbox{a1\label{a1}}{\includegraphics[width=.125\linewidth]{example-image}}\hfill
\subcaptionbox{a2\label{a2}}{\includegraphics[width=.125\linewidth]{example-image}}\hfill
\subcaptionbox{a3\label{a3}}{\includegraphics[width=.125\linewidth]{example-image}}\hfill
\subcaptionbox{a4\label{a4}}{\includegraphics[width=.125\linewidth]{example-image}}\hfill
\subcaptionbox{a5\label{a5}}{\includegraphics[width=.125\linewidth]{example-image}}\hfill
\subcaptionbox{a6\label{a6}}{\includegraphics[width=.125\linewidth]{example-image}}
\caption{bbb}
\label{bbb}
\end{figure}
\end{document}