🎓 Master AI from Zero to Advanced: https://ailearninghub.io
-------------------------
In this video, you’ll learn how to create and customize bar charts using Matplotlib in Python. We cover both vertical and horizontal bar charts, showing you how to visualize categorical data effectively. You’ll see how to create a basic bar chart with sample data (ages and salaries), customize it with colors, labels, titles, and legends, and even tackle overlapping issues by offsetting bar positions using NumPy. Later, we dive into a practical example using Python’s Counter class to build a horizontal bar chart that displays programming language popularity.
To start learning without installing Python locally, use Google Colab.
Introduction to Google Colab: • Google Colab Basics
Create a new Google Colab Notebook: https://colab.research.google.com/#cr...
Table of Contents:
0:00 Introduction to Bar Charts with Matplotlib
0:08 Overview of vertical and horizontal bar charts
0:19 Importing Matplotlib and creating sample data
0:55 Building a basic vertical bar chart using plt.bar
1:34 Customizing the chart with colors, labels, and a title
2:51 Displaying the chart with a legend
3:07 Adding additional datasets for Python and JavaScript salaries
4:39 Offsetting bars using NumPy for better alignment
8:19 Adjusting x-axis ticks to reflect actual ages
9:30 Introduction to horizontal bar charts for large datasets
10:12 Using Python’s Counter to analyze programming language popularity
11:48 Creating a horizontal bar chart with plt.barh
13:34 Reversing list order for improved visualization
14:15 Conclusion and final overview
-------------------------
Social channels:
🐦Twitter: / dankornas
🌍LinkedIn: / daniel-kornas
🕵Facebook: / dankornas
📱Instagram: / dankornas
🧵 Threads: https://www.threads.net/@dankornas
-------------------------
📚 AI Books 📚
Introduction to Generative AI 👉 https://shorturl.at/3dSQz
Build a Large Language Model (From Scratch) 👉 https://shorturl.at/EFv4j
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.