0

I'm a newbie and I would like to change the size of the bar chart I created with Matplotlib and Python, so I can show it in a presentation. I have very much values and the outcoming graphic is far too small. The columns 'State' and 'Hospital 30-Day Readmission Rates from Pneumonia' contain >50 values.

This is my current code:

smallgroup.plot('State', 'Hospital 30-Day Readmission Rates from Pneumonia', kind='bar')
plt.title("Hospital 30-Day Readmission Rates from Pneumonia")
plt.xlabel("States")
plt.ylabel("Readmission Rates")
plt.savefig('readmission_rate_pneumonia.png');
halfer
  • 19,824
  • 17
  • 99
  • 186
Wasabinuss
  • 9
  • 1
  • 4

1 Answers1

1

using width of bar plot :

bar(x, y, width=30)

see example here :

https://plot.ly/matplotlib/bar-charts/

Dadep
  • 2,796
  • 5
  • 27
  • 40
  • It doesn't work. The bar chart is still 432x288 px and the bars are now too big to deifne. With the current px size I have to use a width < 0.5. But this doesn't change the size of the whole graphic. I need a bigger picture. – Wasabinuss Apr 11 '17 at 19:01
  • you should adjust your figure size to your bar size...here information about figure : https://matplotlib.org/api/figure_api.html – Dadep Apr 11 '17 at 19:06