I want to move around the positions of subfigures as follows.
- Move the Panel 3 figure below the Panel 2 figure;
- Move the captions below the Panel 1 figure; and if possible
- Align the subcaptions at the left of each subfigure.
How could I achieve these?
\documentclass[a4paper,11pt]{report}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{tabularx}
\usepackage{caption}
\newcommand\mycaption[2]{\caption{\textbf{#1}\newline\footnotesize#2}}
\captionsetup{font=small, labelfont=bf, singlelinecheck=false, tableposition=bottom, justification=justified}
\begin{document}
% test
\begin{figure}[t!]
\centering
\captionsetup{width=0.5\linewidth}
\subfloat[Panel 1]{
\label{fig1}
\includegraphics[clip,width=0.45\columnwidth]{example-image}}%
\quad
\subfloat[Panel 2]{
\label{fig2}
\includegraphics[clip,width=0.45\columnwidth]{example-image}}%
\hfill
\subfloat[Panel 3]{
\label{fig3}
\includegraphics[clip,width=0.45\columnwidth]{example-image}}%
\mycaption{PPC eigenvectors.}{I want to place Panel 3 figure below Panel 2 figure.
Then write the captions next to Panel 3 (below Panel 1). If possible, I would also like to align the subfigure labels at the left of a image.}
\label{fig}
\end{figure}
\end{document}
Best Answer
First, (almost) every time you end a line with
{
or}
you are adding a space. Specifically, you are adding two spaces before the image.Second, you can put the
\caption
into a minipage to reduce the width. Setting the width using\captionsetup
doesn't help since\caption
begins and ends with\par
.Third, I used a savebox to prevent resetting the subfigure counter. One could also use
\setcounter{subfigure}{2}
., The savebox can also be used to help adjust the alignment (if desired).