您好,我正在尝试使用matplotlib创建下面的子图。
以下是我的代码,但我似乎无法使用参数正确地配置图表。希望能得到任何有关此问题的帮助。欢迎使用其他Python绘图工具来帮助我拼接这四张图。
非常感谢!
gs1 = fig9.add_gridspec(nrows=8, ncols=8, top=0.6, bottom=0.1,left = 0, right = 0.65,
wspace=0.05, hspace=0.05)
# f9_ax1 = fig9.add_subplot(gs1[:-1, :])
ax2 = fig9.add_subplot(gs1[:1, :1])
ax3 = fig9.add_subplot(gs1[:1, 1:])
gs2 = fig9.add_gridspec(nrows=4, ncols=4, top=1.2, bottom=0.4, left = 0, right = 0.5,
wspace=0.05, hspace=0.05)
ax4 = fig9.add_subplot(gs1[1: , :1])
ax5 = fig9.add_subplot(gs1[1:, 1:])
以上代码会得到下图所示的结果: