Seaborn is a high-level data visualization library that is based on Matplotlib. It features a high-level interface that provides informational, attractive and highly presentable graphics.
- Seaborn is a statistical plotting library
- It has beautiful default styles
- It also is designed to work very well with Pandas data frame objects
Why use Seaborn?
Seaborn allows the creation of statistical graphics through these functionalities:
- It is an API based on datasets that allows the comparison between multiple variables
- It supports multi-plot grids that makes it easy to build complex visualizations
- Univariate and bivariate visualizations available to compare between subsets of data
- Availability of different color palettes to reveal various kinds of patterns
- Fitting in and visualizing linear regression models
Python Seaborn vs. Matplotlib:
If Matplotlib “tries to make easy things easy and hard things possible”, Seaborn tries to make a well-defined set of hard things easy too.
- Michael Waskom (Creator of Seaborn)
Matplotlib is good but Seaborn is better. There are basically two shortcomings of Matplotlib that Seaborn fixes:
- Matplotlib can be personalized but it’s quite difficult to find out what settings are required to make plots more attractive. Whereas, Seaborn comes with numerous customized themes to solve this issue.
- While working with Pandas, Matplotlib doesn’t serve well when it comes to dealing with DataFrames, while Seaborn functions actually work on DataFrames.
- Using default themes that are aesthetically pleasing.
- Setting custom color palettes.
- Making attractive statistical plots.
- Easily and flexibly displaying distributions.
- Visualizing information from matrices and DataFrames.
- Plotting statistical time-series data
- Seaborn works well with NumPy as well as Pandas data structures