5

if i have 5 charts, how can i center the last (5th) chart if i've made a a 3x2 subplot?

this is my current code:

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)

Also would like to put more whitespace between the charts, so the axis values don't get all cramped and overlap.. is there an option for that as well?

SpicyClubSauce
  • 4,076
  • 13
  • 37
  • 62
  • 1
    Have a look at this page for the solution: https://stackoverflow.com/questions/12372380/matplotlib-repositioning-a-subplot-in-a-grid-of-subplots – Gilles Apr 03 '20 at 17:26
  • 1
    A solution to this questions is given on this page :https://stackoverflow.com/questions/12372380/matplotlib-repositioning-a-subplot-in-a-grid-of-subplots – Gilles Apr 03 '20 at 17:28

0 Answers0