ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)
Set your Publisher ID in src/config/ads.ts to display live ads.
Matplotlib Data Visualization Tutorial• 5 min read
Bar Charts & Horizontal Bars
Compare categorical data using vertical (plt.bar) and horizontal (plt.barh) bar charts.
Bar Charts with plt.bar()
Use plt.bar() for vertical bars and plt.barh() for horizontal layouts, which are ideal when category labels are long.
ADVERTISEMENT
Google AdSense Slot (inContentBanner)
Set your Publisher ID in src/config/ads.ts to display live ads.
Test Yourself With Exercise
Which function produces a horizontal bar chart in Matplotlib?