Wednesday, January 20, 2021

Python for MBA's- Barplot using Python

 

import numpy as np

import matplotlib.pyplot as plt

fig=plt.figure()

ax=fig.add_axes([0,0,1,1])

GDP=[8.2,8.4,7.2,6.5,8.5,9,9.2]

Year=['2010','2011','2012','2013','2014','2015','2016']

ax.bar(Year,GDP)

plt.show()


No comments:

Post a Comment