Embedding small plots inside subplots in matplotlib
问题 If you want to insert a small plot inside a bigger one you can use Axes, like here. The problem is that I don't know how to do the same inside a subplot. I have several subplots and I would like to plot a small plot inside each subplot. The example code would be something like this: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() for i in range(4): ax = fig.add_subplot(2,2,i) ax.plot(np.arange(11),np.arange(11),'b') #b = ax.axes([0.7,0.7,0.2,0.2]) #it gives an error,