Bar plots quickly get messy and cluttered as the number of categories increases.
For instance, consider the bar chart below, which depicts the exports of various countries across several years:
It is so difficult to interpret this plot because it has too many bars packed into a small space.
In fact, by looking at the above plot, it is almost impossible to tell which countries did no exports and in which year.
A bubble plot is often a better alternative in such cases, as depicted below:
Compared to a bar plot, they are less cluttered and offer much better comprehension.
Firstly, the size-encoded bubbles drastically reduce the clutter, which we noticed earlier (shown above).
Next, it also makes finding countries and their year of no exports effortless.
Isn’t that cool?
You can download the code for this article here: Bubble Chart Notebook.
👉 Over to you: What are some other better alternatives to bar plots and when to use them?
1 Referral: Unlock 450+ practice questions on NumPy, Pandas, and SQL.
2 Referrals: Get access to advanced Python OOP deep dive.
3 Referrals: Get access to the PySpark deep dive for big-data mastery.
Get your unique referral link:
Are you preparing for ML/DS interviews or want to upskill at your current job?
Every week, I publish in-depth ML deep dives. The topics align with the practical skills that typical ML/DS roles demand.
Join below to unlock all full articles:
Here are some of the top articles:
[FREE] A Beginner-friendly and Comprehensive Deep Dive on Vector Databases.
Implementing Parallelized CUDA Programs From Scratch Using CUDA Programming
Understanding LoRA-derived Techniques for Optimal LLM Fine-tuning
8 Fatal (Yet Non-obvious) Pitfalls and Cautionary Measures in Data Science.
5 Must-Know Ways to Test ML Models in Production (Implementation Included).
Don’t Stop at Pandas and Sklearn! Get Started with Spark DataFrames and Big Data ML using PySpark.
Join below to unlock all full articles:
👉 If you love reading this newsletter, share it with friends!
👉 Tell the world what makes this newsletter special for you by leaving a review here :)
It is nice and useful. Bubble charts indeed make it a lot clear showing the trend. However, is there a way to show negative values (currently size does not accept -ve values), say for values like growth rate. Also, the chart indicates boxes where there are no values. How is that done?