Tengo algunos problemas al intentar mostrar varias figuras alineadas horizontalmente en una misma fila, estoy usando los siguientes comandos de LaTeX y obtengo la siguiente figura fuera de 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}
Respuesta1
Parece que estás buscando lo siguiente:
Como mencionó @Miyase en su comentario, no entiendes el significado de las opciones de subfigura. Thea son importantes para su ubicación: t
(para arriba), c
(para el medio) y b
(para abajo). Las etiquetas de los títulos se definen mediante \caption
comando y, de forma predeterminada, son las letras minúsculas a, b, c, etc. que se restablecen en cada figure
(o table
) flotante.
Entonces, el MWE de tu figura debería 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}
Respuesta2
Puede configurar el primer parámetro subcaptionbox
como vacío si no necesita subtítulos, como por ejemplo \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}