Python 使用奇数个图表时,将最后一个matplotlib子批次图表居中

Python 使用奇数个图表时,将最后一个matplotlib子批次图表居中,python,matplotlib,charts,subplot,Python,Matplotlib,Charts,Subplot,如果我有5张图表,如果我制作了一个3x2子地块,我如何将最后一张(第5张)图表居中 这是我当前的代码: plt.figure(1) plt.subplot(321) firstperiod.megaball.plot(kind='hist', bins = 25) plt.subplot(322) secondperiod.megaball.plot(kind='hist', bins = 36) plt.subplot(323) thirdperiod.megaball.plot(kin

如果我有5张图表,如果我制作了一个3x2子地块,我如何将最后一张(第5张)图表居中

这是我当前的代码:

plt.figure(1)

plt.subplot(321)
firstperiod.megaball.plot(kind='hist', bins = 25)

plt.subplot(322)
secondperiod.megaball.plot(kind='hist', bins = 36)

plt.subplot(323)
thirdperiod.megaball.plot(kind='hist', bins = 52)

plt.subplot(324)
fourthperiod.megaball.plot(kind='hist', bins = 46)

plt.subplot(325)
fifthperiod.megaball.plot(kind='hist', bins = 15)

还希望在图表之间添加更多的空白,这样轴值就不会变得拥挤和重叠。。还有其他选项吗?

请查看本页了解解决方案:本页提供了此问题的解决方案: