How to change the opacity of a plot using Matplotlib
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Changing the opacity of plot can be extremely useful when you want to compare multiple features, especially when your plot is crowded.
Here is a simple example of a line plot, using the matplotlib library.
As you can see we use the alpha parameter that specify the opacity of the plot which has as value [0,1] (e.g. 0.5).
Here you are ! you now know how to set the opacity of a plot using Matplotlib.
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Related Articles
Continue your learning journey with these related topics
Master Data Science in Days, Not Months 🚀
Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚