import matplotlib.pyplot as plt
plt.figure()
plt.subplot(2, 2, 1)
plt.plot([0, 1], [0, 1])
plt.subplot(2, 2, 2)
plt.plot([4, 1], [0, 1])
plt.subplot(2, 2, 3)
plt.plot([0, 2], [0, 1])
plt.subplot(2, 2, 4)
plt.plot([0, 1], [0, 4])
plt.show()
plt.subplot(2, 2, 1)------把figure分成2*2的块,并在第一个画图
那如果我们要达到下图的效果怎么做呢?
仔细看怎么分的块
plt.figure()
plt.subplot(2, 1, 1)
plt.plot([0, 1], [0, 1])
plt.subplot(2, 3, 4)
plt.plot([4, 1], [0, 1])
plt.subplot(2, 3, 5)
plt.p