# How to show a smaller plot inside a bigger one? [duplicate]

I plot a function with PlotRange -> All called pl1 and again plot the same but this time with PlotRange -> a finite number called pl2. Now I want to show pl1 in large size and pl2 inside it (exactly in top right of it or any arbitrary position) with a small size. A toy example can be

pl1 = Plot[Exp[x], {x, 0, 10}, PlotRange -> All]
pl2 = Plot[Exp[x], {x, 0, 10}, PlotRange -> 50]


How can I do it? I can use GraphicsGrid but I have no idea how to change the size and position of two graphics? BaselinePosition is useless without changing the sizes.

Note that in reality, I have plotted several functions in a single plot and I need to see the points where these functions intersect in a magnified plot (pl2).

• Plot[Exp[x], {x, 0, 10}, PlotRange -> All, Epilog -> Inset[ Plot[Exp[x], {x, 0, 4}, PlotRange -> {0, 50}], Scaled[{.4, .6}]]] Commented Jan 21, 2022 at 14:55

pl1 = Plot[Exp[x], {x, 0, 10}, PlotRange -> All]
pl2 = Plot[Exp[x], {x, 0, 5}
, GridLines -> Automatic
, PlotRange -> 50
, Background -> Nest[Lighter, Yellow, 3]]

pl3 = Plot[Exp[x]
, {x, 0, 10}
, PlotRange -> All
, GridLines -> Automatic
, Epilog -> {Inset[pl2, {2, 10000}, {0, 0}]}
]


Here (0,0) of the inset plot is aligned with (2,10000) in the main plot.

• Thanks a lot. and how can I change the position of inner plot arbitrary? for example in the corner of top right? Commented Jan 21, 2022 at 15:09
• Align it to a different point using the scheme shown. There is also a Size parameter in one of the syntax variations. Look at 138354 as well.
– Syed
Commented Jan 21, 2022 at 15:17
• There is a tutorial as well in the docs.
– Syed
Commented Jan 21, 2022 at 15:23
• Thanks a lot for your help Commented Jan 21, 2022 at 15:38