# Inset figures using show

If I have to figure done as in the following format:

Figure1= Show[....(*Several figures*)....]
Figure2=Show[....(*Several figures*).....]


Questions:

1. How can I put Figure2 as an inset of Figure1?
2. How can I specify the size and where Figure2 will go in Figure1

I tried using the following but it plots both figures on top of each other (showing mostly Figure1):

Show[Figure1, Epilog -> {Inset[Figure2]}]


I also tried using what I found here: How to insert a plot into another plot but it didn't work for me, perhaps because of Show?

Thanks,

• Use Show[Figure1, Graphics@Inset[Figure2, ....]] Jan 3 at 23:10
• @MarcoB this seems to give the same result than Show[Figure1, Epilog -> {Inset[Figure2]}]. I guess it can work by reducing the size of Figure2 but ImageSize is not suitable in this case. Also by using a command to place it in a given location
– John
Jan 3 at 23:18
• Not sure that I understand; I posted an example in the answer below. See if that clarifies what I meant. If that doesn't work, you might have to share the exact structure of the two Figures you have. Jan 3 at 23:24
• @MarcoB thanks for the clarification! it helped a lot !
– John
Jan 3 at 23:32

Two sample graphics generated by combining plots with Show:

fig1 = Show[Plot[Style[Sin[x], Red], {x, -2, 2}], Plot[Style[Cos[x], Red], {x, -2, 2}]];
fig2 = Show[Plot[Style[x^2, Blue], {x, -2, 2}], Plot[Style[-x^2 + 2, Blue], {x, -2, 2}]];


Let's combine them by inlaying the second one into the first one, with control over size, relative position, and placement:

Show[
fig1,
Graphics@Inset[fig2, {-1.5, -0.3}, {Left, Bottom}, Scaled[1/3]]
] 