# How can I add two Insets to the same image, one on top and one on bottom?

I would like to modify an existing code to add two Insets to the same image, with one at the top and the other at the bottom. Does anyone know how I can do this?

ClearAll[x, y];
x[t_] = Sin[50 t]/t + Cos[t];
y[t_] = Sin[30 t]/t^2 + Cos[t^2];
sub1 = Plot[x[t], {t, 1, 2}, PlotStyle -> {Blue, Red},
PlotRange -> All];
sub2 = Plot[y[t], {t, 1, 2}, PlotStyle -> {Blue, Red},
PlotRange -> All];
Plot[{x[t], y[t]}, {t, 0, 2 Pi}, PlotStyle -> {Blue, Red},
Epilog -> Inset[sub1, Scaled[{.3, .6}], Scaled[{0, 0}], 3],
PlotRange -> {-12, 12}, PlotRangeClipping -> False]

• Just make the argument to Epilog a list: Epilog->{Inset[...],Inset[...]} Apr 12, 2023 at 23:14
• @lericr Didn't know you could do that. Why does this not work Epilog -> {Inset[sub1, Scaled[{.3, .6}], Scaled[{0, 0}], 3], Inset[sub2, Scaled[{.3, -0.6}], Scaled[{0, 0}], 3]}?
– hana
Apr 12, 2023 at 23:20

You need to be careful when you use the Inset with the 3rd argument as the position is relative. A more "intuitive" method would be to scale the image using ImageSize and then using Inset with only two arguments, the second being Scaled.
ClearAll[x, y];