Showcasing my ability to transform raw data into clear, compelling visual insights using Seaborn and Matplotlib. This repository documents my progression from foundational plots to more polished, publication-ready visualizations.
This project demonstrates:
- Strong fundamentals in Python data visualization
- Clean, readable, and reproducible plotting code
- Appropriate chart selection for different analytical tasks
- Professional styling and storytelling with data
The goal is to build visualizations that are not just correct β but communicate insight effectively.
Focus: Getting started with Seaborn and Matplotlib.
- Setting up plotting environment
- Understanding figure vs axes
- First statistical plots
- Using Seaborn themes
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_theme(style="whitegrid")
tips = sns.load_dataset("tips")
sns.scatterplot(data=tips, x="total_bill", y="tip")
plt.title("Total Bill vs Tip")
plt.show()β Seaborn handles statistical aesthetics β Matplotlib controls the figure
Focus: Visualizing trends over time.
- Time series
- Trend analysis
- Continuous progression
sns.lineplot()- Confidence intervals
- Markers and smoothing
- Proper date handling
sns.lineplot(data=flights, x="year", y="passengers")
plt.title("Airline Passengers Over Time")
plt.show()π‘ Best practice: Always label axes and check time ordering.
Focus: Comparing categories and visualizing matrices.
Use when: comparing discrete categories.
sns.barplot(data=tips, x="day", y="total_bill")
plt.title("Average Bill by Day")
plt.show()Key lessons
- Aggregation happens automatically
- Order categories intentionally
- Avoid overcrowding
Use when: showing correlation or matrix patterns.
corr = tips.corr(numeric_only=True)
sns.heatmap(corr, annot=True, cmap="coolwarm")
plt.title("Correlation Heatmap")
plt.show()Key lessons
- Great for feature relationships
- Use diverging colormaps for correlations
- Annotate when matrix is small
Focus: Exploring relationships between variables.
- Correlation discovery
- Outlier detection
- Cluster exploration
sns.scatterplot(
data=tips,
x="total_bill",
y="tip",
hue="time",
size="size"
)
plt.title("Tip vs Total Bill")
plt.show()Key skills
- Semantic mappings (
hue,size,style) - Overplotting awareness
- Using transparency (
alpha)
π‘ Scatter plots are often the first diagnostic tool in EDA.
Focus: Understanding variable distributions.
sns.histplot(tips["total_bill"], bins=30, kde=True)
plt.title("Distribution of Total Bill")
plt.show()sns.kdeplot(data=tips, x="total_bill", fill=True)
plt.show()sns.boxplot(data=tips, x="day", y="total_bill")
plt.show()Key lessons
- Always inspect distributions before modeling
- Watch for skewness and outliers
- Combine histogram + KDE for clarity
Focus: Professional-quality visualization.
sns.set_theme(style="whitegrid", palette="muted")plt.figure(figsize=(8,5))
plt.title("Professional Plot", fontsize=14)
plt.xlabel("X Label")
plt.ylabel("Y Label")
plt.tight_layout()- Consistent color palette
- Proper figure sizing
- Readable fonts
- Minimal chart junk
- Informative titles
Use Matplotlib when you need:
- Fine-grained control
- Subplots
- Custom annotations
- Publication formatting
Example:
fig, ax = plt.subplots(figsize=(8,5))
ax.plot([1,2,3], [4,5,6])
ax.set_title("Matplotlib Control Example")
plt.show()Focus: End-to-end visualization workflow.
- Data cleaning
$\rightarrow$ visualization pipeline - Appropriate chart selection
- Multi-plot storytelling
- Professional styling
- Clear analytical narrative
- Python
- Pandas
- Seaborn
- Matplotlib
- Jupyter Notebook
π see more on matplotlib Gallery http://matplotlib.org/ or https://matplotlib.org/stable/tutorials/pyplot.html