Seaborn

0.13.2 · active · verified Sat Mar 28

Seaborn is a high-level Python library for creating statistical graphics, building on Matplotlib and integrating closely with Pandas data structures. It provides a dataset-oriented API to draw attractive and informative statistical plots with ease. The library is actively maintained with regular minor and major releases, currently at version 0.13.2, ensuring compatibility with evolving data science ecosystems.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates loading a built-in dataset, applying a theme, and creating a relational scatter plot using Seaborn's high-level API. It also includes basic Matplotlib calls for customization and displaying the plot.

import seaborn as sns
import matplotlib.pyplot as plt

sns.set_theme(style="darkgrid")

# Load an example dataset
tips = sns.load_dataset("tips")

# Create a scatter plot
sns.scatterplot(
    data=tips, 
    x="total_bill", 
    y="tip", 
    hue="smoker", 
    style="time", 
    size="size"
)

plt.title("Total Bill vs. Tip by Smoker and Time")
plt.xlabel("Total Bill ($)")
plt.ylabel("Tip ($)")
plt.show()

view raw JSON →