# Placing images into different columns

I have the following requirement where there are some plots which will be stacked in two columns as shown in the figure. And in addition there is a color bar which will be placed on the right side vertically. Could you help me achieve that in latex ?

Thanks in advance

PS : I tried with subfigure environmment with \usepackage{subcaption} and \usepackage{caption}. This is not working because of the \usepackage{subfig} already present in the preamble, which I use it also for stacking figures into multiple columns in a different place in the document.

• Is it correct that a) there are no subcaptions, and b) there is no need to refer to individual sub-images as Fig 1a, Fig 1b, etc.? Jul 16, 2021 at 12:09
• @StevenB.Segletes, yes, you are right. I don't need subcaptions and don't need to refer to individual sub-images. I just want to stack the only the colorbar on the third column Jul 16, 2021 at 12:40

## 1 Answer

In this case, the vertical extent of the A/B figure stack will grow/shrink to match the specified height of the C-color bar.

While in my code, A/B/C are all included graphics, there is nothing that precludes them from instead being, for example, a tikz coded image.

\documentclass{article}
\usepackage{scalerel,stackengine}
\begin{document}
\begin{figure}[ht]
\centering
\scalerel{%
\stackunder[0pt]{%
\includegraphics{example-image-a}%
\includegraphics{example-image-a}%
}{%
\includegraphics{example-image-b}%
\includegraphics{example-image-b}%
}}%
{\includegraphics[width=20pt,height=100pt]{example-image-c}}
\caption{my caption}
\end{figure}
\end{document}