DEV Community

Aditi Sharma
Aditi Sharma

Posted on

πŸš€ Day 13 of My Python Learning Journey

Data Visualization with Matplotlib & Seaborn

Today I entered the world of data visualization using two powerful Python libraries β€” Matplotlib & Seaborn πŸŽ¨πŸ“Š

πŸ”Ή Matplotlib

The backbone of Python visualization.

import matplotlib.pyplot as plt

x = [1,2,3,4]
y = [2,4,6,8]

plt.plot(x, y)
plt.show()

βœ… Supports: Line, Bar, Scatter, Histogram, Pie, Stack plots

πŸ”Ή Seaborn

Built on Matplotlib but more beautiful & statistical.

import seaborn as sns
import pandas as pd

df = pd.DataFrame({"x":[1,2,3,4], "y":[2,4,6,8]})
sns.scatterplot(x="x", y="y", data=df)

βœ… Supports: Heatmaps, Pairplots, Boxplots, Violin plots, Distribution plots

⚑ Fun Facts
β€’ Mathplotlib is the OG of Python plotting (created in 2003 πŸŽ‰).
β€’ Seaborn makes plots aesthetic & easier to interpret.
β€’ Visualization is key in Data Analytics & Machine Learning to spot patterns quickly.

✨ Reflection
Visuals make data stories come alive. Excited to dive deeper into statistical plots and dashboards next! πŸš€

Python #Matplotlib #Seaborn #100DaysOfCode #DataAnalytics #DevCommunity

Top comments (0)