# Figure inside figure

Can I render a figure inside another figure. For example, I want to have a big figure and showing a small one (like for zooming in) instead of the legend.

Can I do that using latex?

Thanks.

• I would do it "outside" with graphic tools and simple put in one figure, that will save you a lot of trouble – Dukeatcoding Jun 5 '13 at 12:34
• Is this what you have in mind: Magnifying part of a picture? – Alexander Jun 5 '13 at 12:52
• yes you can, but don't wrap them in separate figure environments. think of this more as "including two graphic objects in the same float environment". – barbara beeton Jun 5 '13 at 12:53
• Related: Using Overpic and TikZ packages by JLDiaz – texenthusiast Jun 5 '13 at 19:52
• @Alexander, no, I want two different figures, the zooming was just for example. But that's nice, thanks. – Assimiz Jun 30 '13 at 20:24

I \llap the embedded image after setting the large image. The 2.5in is the vertical rise and the 0.2in is the leftward offset of the embedded image.

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}

Here is some text.

\begin{figure}[ht]
\includegraphics[scale=1]{example-image-1x1}
\centering
\llap{\shortstack{%
\includegraphics[scale=.2]{example-image}\\
\rule{0ex}{2.5in}%
}
\rule{0.2in}{0ex}}
\caption{This is my embedded figure}
\end{figure}

And text continues\ldots

\end{document}


• Of course, my stackengine package can do this function directly with the \stackinset macro. – Steven B. Segletes Apr 10 '18 at 13:11