Advertisements
Advertisements
प्रश्न
How can we make the bar chart of the figure horizontal?

अति संक्षिप्त उत्तर
Advertisements
उत्तर
- Change the function: Replace
plt.bar()with plt.barh()in your code. - Swap the labels:
Change plt.xlabel("Day")toplt.ylabel("Day")and change plt.ylabel("Sales in Rs") toplt.xlabel("Sales in Rs").
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
