Quiz 2

Seaborn

73 words
1 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Seaborn [Join Discord](https://discord.gg/gE2m4Qrdqv) [Previous**Tool Comparison**](/notes/04-degree-electives-bscs4001-data-viz-week04-04b-tool-comparison)[Next**Plotly**](/notes/04-degree-electives-bscs4001-data-viz-week06-06-plotly)

Seaborn

python
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
# Load built-in dataset
df = sns.load_dataset('tips')
# Distribution
sns.histplot(df['total_bill'], kde=True)
plt.title('Distribution of Total Bill')
plt.show()
# Box plot by category
sns.boxplot(data=df, x='day', y='total_bill', hue='sex')
plt.show()
# Pairplot
sns.pairplot(df, hue='smoker')
plt.show()
# Regression plot
sns.lmplot(data=df, x='total_bill', y='tip', hue='sex')
plt.show()
# FacetGrid
g = sns.FacetGrid(df, col='time', row='sex')
g.map(sns.histplot, 'total_bill')
plt.show()
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.