'How to change Matplotlib barchart image size
Im having some issues with my Matplotlib barchart, my barchart's size is zoomed in for some reason and im not sure why. This is what it currently looks like

A lot of the values cannot be seen, is there a way I can zoom out or maybe resize the image upon creating the barchart? My Code
Bar_Year = ['Year 1', 'Year 2', 'Year 3', 'Year 4', 'Year 5','Year 10','Year 20','Year 30']
Bar_Rent = [Year1, Year2, Year3, Year4, Year5, Year10, Year20, Year30]
Bar_Color = ['#003049','#D62828','#F77F00','#000000','#2A1A1F','#4D6A6D','#222E50','#439A86']
#Creating Bar Chart with MatPlotLib
plt.clf()
plt.bar(Bar_Year, Bar_Rent, color=Bar_Color)
plt.title('Rent Growth')
plt.xlabel('')
plt.ylabel('Future Figures')
#Creating the Image Name
image_name2 = random.randint(5000, 10000)
image_name2 = str(image_name2) + '.png'
#Saving the Bar Chart
fig.savefig(image_name2, dpi=100)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
