Magnifier lens of various shapes in Plots or Makie

I came across the two gif animations in the following slides in a talk that I attended last year (they are not moving :rofl: in the pictures that I attached).

I wonder if I can reproduce the same animations, in particular, the circular / elliptical magnifier lens with Plots or Makie.

1 Like

In Plots I would use lens with borders turned off and draw an ellipse on top with Shape. You may even manage to draw the ellipse in the original plot and have it zoom with the lens. This won’t be perfect, but it might work.

I found lens in the documentation of Plots. I will try to tweak around with the provided example tomorrow. At the moment it seems that any attributes I pass to inset will also apply to the main plot.

Drawing ellipse and lines is not too difficult, the main problem is probably to be to turn off the right things.