import matplotlib.gridspec as gridspec
gs=gridspec.GridSpec(3,3)#将当前区域划分为3x3的网格
ax1=plt.subplot(gs[0,:])
ax2=plt.subplot(gs[1,:-1])
ax3=plt.subplot(gs[1:,-1])
ax4=plt.subplot(gs[2,0])
ax5=plt.subplot(gs[2,1])
import matplotlib.gridspec as gridspec
gs=gridspec.GridSpec(3,3)#将当前区域划分为3x3的网格
ax1=plt.subplot(gs[0,:])
ax2=plt.subplot(gs[1,:-1])
ax3=plt.subplot(gs[1:,-1])
ax4=plt.subplot(gs[2,0])
ax5=plt.subplot(gs[2,1])