I am novice on LaTeX, and I tried to align figure and caption. But This happens. What should I do? Especially caption Graph1 is looking bad so I want to align with the square figure.
I am finding information from here, with the same problem, but I can find nothing at all like me…
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\begin{subfigure}[normal]{0.4\textwidth}
\includegraphics[width=0.6\textwidth]{36.jpg}
\caption{Graph1}
\end{subfigure}
\begin{subfigure}[normal]{0.4\textwidth}
\includegraphics[width=0.8\textwidth]{37.jpg}
\caption{Graph2}
\end{subfigure}
\caption{Two graphs for tests.}
\end{figure}
\end{document}
Best Answer
subfigure
, you need to insert\centering
instruction in eachsubfigure
.H
figure position options. It can cause unexpected problems, when is not sufficient palce in page, where image is inserted.