In Chapter 6, Plotting with Advanced Features, we learned how to plot inset axes within the main axes, using the object-oriented interface of Matplotlib. In this recipe and the next one, we will learn how to use the inset_locator helper functions of the axes_grid1 toolkit to create inset axes and plot images and other graphs.
In this recipe, we will learn how to zoom in on a portion of an image and display it in the inset axes of the same main axes.
We will plot the image on two axes and zoom in on different portions of the image in each of the plots.