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! π
Top comments (0)