My question is similar to Magnifying part of a picture similar to TikZ spy library. Using the spy library I want to produce the same figure as shown in the answer https://tex.stackexchange.com/a/59710/132815.
However, I want the image to be 1.) rescalable to have a width that is a fraction of the line width (in a figure environment) and 2.) I want not to have to readjust the locations of the magnifying glass (in- and on- locations) when changing this fraction.
I don't quite understand from the linked answer how to go about this. How do I do this? What (scale invariant) coordinates do I use to specify the magnifying glass locations?