I'm trying to draw boxes around some figures in LaTeX. I have 6 sub-figures and I want to draw boxes around pairs of them. They're laid out in 2 rows and 3 columns layout and I want to draw a box around (0,0) and (1,0), (0,1) and (1,1), etc.
|---------|---------|---------|
| Figure1 | Figure2 | Figure3 |
| | | |
| Figure4 | Figure5 | Figure6 |
|_________|_________|_________|
caption for all figures
Something like the above.
The code I have is:
\begin{figure}[ht]
\centering
\includegraphics[width=0.23\textwidth]{Figure1.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure3.pdf}
\includegraphics[width=0.23\textwidth]{Figure4.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure5.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure6.pdf}
\caption{This is the caption.}
\end{figure}