You spent the last post fighting with Matplotlib.
Setting figure sizes. Adjusting label positions. Choosing colors. Adding grids. Writing five lines to make one chart look presentable.
Seaborn does not eliminate Matplotlib. It sits on top of it. What it does is handle all the statistical chart types with sensible defaults, so you spend time on insights instead of formatting.
The difference is real. What takes 20 lines in Matplotlib takes 3 in Seaborn for the same result.
Setup
import seaborn as sns import matplotlib.pyplot as plt import pandas as pd import numpy as np
sns . set_theme ( style = " whitegrid " , palette = " husl " )
titanic = sns . load_dataset ( " titanic " ) tips = sns . load_dataset ( " tips " ) iris = sns . load_dataset ( " iris " )
print ( titanic . shape , tips . shape , iris . shape )
Enter fullscreen mode
Exit fullscreen mode
Output:
(891, 15) (244, 7) (150, 5)
Enter fullscreen mode
Exit fullscreen mode
sns.load_dataset() downloads built-in practice datasets.…