Consider two plots, one of which will contain the other as an inset.
inset = Plot[ x, {x, 1, 2}
, Frame -> True
]
A = Plot[ x^2 , {x, 1, 2}
, Epilog -> { Inset[ inset, {1.5, 2.5}, {1, 1}, 0.5]}
]
This code works perfectly with one limitation. Let's say I want to place the inset that spans from 1.5 to 1.9 in the scale of x-axis in the main panel while keeping the aspect ratio of the inset constant. To achieve this effect, I had to manually controls the fourth option, which scales the inset object. Is there anyway to automate this process?