I’ve tried a few things around modifying the rectangular draw. But I think I can’t get it to just draw only a portion. I would really prefer not to manually just set the rectangle to 0 and then draw the lines, but I’m thinking that is most likely what I will need to do. Is there a better way?
Axes.indicate_axes_zoom returns the Rectangle object:
import numpy as np import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot(np.arange(0, 10, 0.1)**(1/2)) axins = ax.inset_axes([0.6, 0.1, 0.2, 0.2]) axins.plot(np.arange(0, 10, 0.1)**(1/2)) axins.set_xlim([20, 60]) axins.set_ylim([1, 2.5]) rect, lines = ax.indicate_inset_zoom(axins) rect.set_edgecolor('none')
For what it is worth, I’m not clear why you want this, but…