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} %
2
  • 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! Commented Jun 2, 2015 at 20:44
  • @ThijsRoebroek what packages are you using?
    – juanuni
    Commented Jun 3, 2015 at 0:19

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .