// We set the axis limits to something other than the default, in order to not
// distract from the fact that axes coordinates are used here.
ax.axis([0, 10, 0, 10])
// Note how the two following insets are created at the same positions, one by
// use of the default parent axes" bbox and the other via a bbox in axes
After Change
ax2 = fig.add_subplot(133)
ax2.set_xscale("log")
ax2.set(xlim=(1e-6, 1e6), ylim=(-2, 6))
// Create inset in data coordinates using ax.transData as transform
axins3 = inset_axes(ax2, width="100%", height="100%",
bbox_to_anchor=(1e-2, 2, 1e3, 3),