0

I'm trying to put two pictures beneath eachother within the same figure environment using subcaptions. I would like both subcaptions (which is just a) and b) in my case) to be alligned vertically. This is easy if I use the same width for both pictures, but I want to shrink the bottom picture to about 50% of its size. However, if i use width=0.5\textwidth for the bottom picture, its caption is also displaced according to the picture size and this way a) and b) are not alligned anymore. I'm using the following example:

\begin{figure}
    \subfloat[]{\includegraphics[width=1\textwidth]{./afbeeldingen/avrrecognition.png}}
    \newline
    \subfloat[]{\includegraphics[width=1\textwidth]{./afbeeldingen/RGA.png}}
    \caption[Symptoms of rice blast disease]{Symptoms of rice blast disease. (a) Example of rice blast outbreak. (b) Lesions appearing on the leaf of a rice plant after invasive growth.}
    \label{fig:RGA}
\end{figure} %
  • 1
    Your question is very clear, and thanks for the example code. Still, if you would post a minimal working example (meta.tex.stackexchange.com/questions/228/…), from \documentclass to \end{document}, it would be much easier to help you. Welcome to TeX.SE! – dgoodmaniii Jun 2 '15 at 20:44
  • @ThijsRoebroek what packages are you using? – juanuni Jun 3 '15 at 0:19
1

Basically, you need to add \centering. (BTW, this is what an MWE looks like.)

\documentclass{article}
\usepackage{subfig}
%\usepackage{subcaption}
\usepackage{mwe}

\begin{document} 
\begin{figure}
    \centering
    \subfloat[]{\includegraphics[width=1\textwidth]{example-image-a}}
    \newline
    \subfloat[]{\includegraphics[width=0.5\textwidth]{example-image-b}}
    \caption[Symptoms of rice blast disease]{Symptoms of rice blast disease. (a) Example of rice blast outbreak. (b) Lesions appearing on the leaf of a rice plant after invasive growth.}
    \label{fig:RGA}
\end{figure} %
\end{document}

centered

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.