Q. Navya has started an online business. A list stores the number of orders in last 6 months. Write a program to plot this data on a horizontal bar chart.


Answer :-


import matplotlib.pyplot as plt
import numpy as np

n = [ 50,68,74,96,155,177]
X = np.arange(1,7,1)

plt.barh( X , n )
plt.ylabel("Months")

plt.show()


Output :-



Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post