Some examples plots that seaborn can create, if everything goes well
Some examples plots that seaborn can create, if everything goes well

Explaining some aspects of using seaborn that most often confound newcomers

This post aims to explain three of the most common difficulties encountered by users of seaborn, a Python library for data visualization. My hope is that this post can be a helpful resource for users who have read through some of the documentation — which uses toy datasets and focuses on simple tasks — but are now struggling to apply the lessons to their own work.

You (might) need to reformat your data

Seaborn’s plotting functions are most expressive when provided with a “tidy” long-form dataset. …


Today sees the 0.11 release of seaborn, a Python library for data visualization. This is a major update with a number of exciting new features, updated APIs, and better documentation. This article highlights some of the notable features and updates; see the seaborn website for detailed release notes.

Modernized distribution plots

The distribution plots have been completely rewritten for this release, modernizing the APIs, enhancing existing capabilities, and adding exciting new features. With these changes, you can visualize conditional distributions via semantic mapping and faceting with just a single declarative function call:

sns.displot(
data=penguins, kind="hist", kde=True,
x="flipper_length_mm", col="island", hue="species",
)

Michael Waskom

Computational cognitive neuroscientist and creator of the seaborn data visualization library

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store