from matplotlib import pyplot as plt
from matplotlib import gridspec as gs
plt.figure(facecolor='white')
gs = gs.GridSpec(3,3)
plt.subplot(gs[0,2])
plt.subplot(gs[1,0])
plt.subplot(gs[2,1:])
plt.show()
subplots 创建子图,共享x,y
from matplotlib import pyplot as plt
# 创建子图 2行3列,共享x ,y 轴坐标
figure,subs = plt.subplots(nrows=2,ncols=3,sharex=True,sharey=True)
figure.set_facecolor('white')
subs[0,0].plot([1,2,3])
subs[1,1].plot([1,2,3])
plt.show()