# How to position figures

I want to position three figures below eachother, and then have a colour bar on the left side - see the example picture below. I have tried using minipages and subfloat, but it has not been successfull. Does anyone know how to do this?

Kind regards Trine

I have tried using this code - however it does not work properly and gives some errors.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\newsavebox{\measurebox}
\begin{document}
\begin{figure}
\centering
\sbox{\measurebox}{
\begin{minipage}[b]{.85\textwidth}
\centering
\subfloat
{\label{fig:figB}\includegraphics[scale=0.38]
{figures/Gom_correlate/Facet19Stage2}\subcaption{}\vspace{3mm}}
\vfill
\subfloat
{\label{fig:figB}\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}\subcaption{}\vspace{3mm}}
\vfill
\subfloat
{\label{fig:figC}\includegraphics[scale=0.385]{figures/Gom_correlate/Facet10Stage2}}
\subcaption{}
\end{minipage}}
\begin{minipage}[b][\ht\measurebox][s]{.09\textwidth}
\includegraphics[scale=0.25]{figures/Gom_correlate/ColourBar}
\label{fig:figA}
\end{minipage}
\caption{Difference in strain at stage 2 for different facet sizes, a) the standard size of 19 pixel, b) 10 pixel and c) 30 pixel.}
\end{figure}
\end{document}


try the following:

\documentclass{article}
\usepackage[demo,
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tabularx}

\newsavebox{\measurebox}
\begin{document}
\begin{figure}[htb]
\sbox\measurebox{\begin{minipage}{0.8\linewidth}\centering
\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}
\subcaption{}
\label{fig:figA}

\includegraphics[scale=0.38]{figures/Gom_correlate/Facet19Stage2}
\subcaption{}
\label{fig:figB}

\includegraphics[scale=0.385]{figures/Gom_correlate/Facet10Stage2}
\subcaption{}
\label{fig:figC}
\vspace*{-4ex}
\end{minipage}
}
\centering
\begin{tabular}{m{0.8\linewidth} m{0.12\linewidth}}
\usebox\measurebox
&
\includegraphics[height=\dimexpr\ht\measurebox+\dp\measurebox,
width=\linewidth, valign=c]
{figures/Gom_correlate/ColourBar}
\end{tabular}
\vspace{4ex}
\caption{Difference in strain at stage 2 for different facet sizes, a) the standard size of 19 pixel, b) 10 pixel and c) 30 pixel.}
\label{fig:fig}
\end{figure}
See Fig. \ref{fig:fig}, particularly sub figure \ref{fig:figC}.
\end{document}


above mwe gives:

is this what you looking for?

What about making it one picture? So that you insert a picture containing the three pictures and the colorbar? I think that is what I would have done :)

• I thought about doing that too. Just really like making references in text to the subfigures. But I can of course do that by hand, if that is the only way. – Trine Apr 10 '19 at 12:28
• using subfigures from the package subcaption you can reference them. if you will show your code (in form of small but complete document} we can show you how to do this. – Zarko Apr 10 '19 at 12:34
• I have tried adding the code. However it does nok look properly as the demo figures are rectangular shapes. – Trine Apr 10 '19 at 13:20