03.02.22
Seaborn was already my favourite Python visualisation library - it just got better!
I generally use Python as my go to language, but originally I used R. The thing I miss most about R is its visualisation capabilities. Creating plots in Python, particularly with matplotlib, is such a chore.
So far, the best visualisation library I have found is Seaborn. It is based on matplotlib but improves its interface. Seaborn's creator Micheal Waskom has recently created an entirely new interface for the library, that is somewhat inspired by ggplot2's approach to graphics. It follows the 'grammar of graphics' philosophy where a plot is iteratively built up by adding layers to it. This works really well when interactively exploring a dataset.
Here is some example code:
import seaborn.objects as so
import seaborn
seaborn.set_theme()
tips = seaborn.load_dataset("tips")
(
so.Plot(tips, x="total_bill", y="tip", color="day", fill="time")
.add(so.Scatter(fillalpha=.8))
)
This has not been released yet, but I'm excited about this development.