I want to achieve something Like this for an image. I have the coordinates for all 4 vertices of the rectangular section which I want to show zoomed. How can I plot it using matplotlib or any other library?
Asked
Active
Viewed 116 times
0
-
1See this: https://stackoverflow.com/questions/62625811/how-can-i-plot-subplots-with-nested-plot-arrowed-at-a-specific-point/62627925 And/Or: https://matplotlib.org/3.2.2/gallery/subplots_axes_and_figures/zoom_inset_axes.html – fdireito Jul 04 '20 at 17:58
-
1To go with the first option but get the zoom-like effect lines that are shown in the second option, use mark_inset, from: `from mpl_toolkits.axes_grid1.inset_locator import mark_inset` – fdireito Jul 04 '20 at 18:08
-
Can you provide a shortcode with a sample image? I have seen almost all links on the internet but they are done with x,y plots, not with images :( – vivek._.s Jul 04 '20 at 19:23
-
In my first comment I had two links. The second one is for an example with image. It is using `imshow`, which should be what you're looking for. Or are you thinking in something else? – fdireito Jul 06 '20 at 16:38