Difference between Matplotllib and Seaborn Libraries of Python

Difference between matplotllib and seaborn:-
1. Functionality:
Matplotlib: Matplotlib is mainly deployed for basic plotting.
Visualization using Matplotlib generally consists of bars, pies, lines, scatter plot.
Seaborn: Seaborn will provide a variety of visualization patterns.
It will use less syntax and has easily interesting default themes.
It is used if one has to summarize data in visualizations and also show the distribution in the data.
2. Handling Multiple Figures:
Matplotlib: Matplotlib has multiple figures and can be opened but need to be closed explicitly.
plt.close() only closes the current figure. plt.close('all') would close all.
Seaborn: The Seaborn automates the creation of multiple figures.
This leads to OOM (out of memory) issues.
3. Visualization:
Matplotlib: Matplotlib is a graphics package for data visualization of Python.
It is well integrated with NumPy and also Pandas.
The pyplot module mirrors the MATLAB plotting command very closely.
Thus MATLAB users can easily transit to plotting with Python.
Seaborn: Seaborn is more integrated for working with Pandas a data frame.
It will extend the Matplotlib library for creating beautiful graphics with Python.
4. Data frames and Arrays
Matplotlib: Matplotlib will works with data frames and arrays.
It has stateful APIs for plotting the figures and aces.
They are represented by the object and therefore plot () like calls without parameters suffices and without having to manage parameters.
Seaborn: Seaborn will work with the dataset as a whole and is much intuitive than Matplotlib.
For Seaborn the replot() is the entry API with parameter to specify the type of plot which could be line, bar, or many of other types.
Seaborn is not stateful and plot() would require passing the object.
5. Flexibility:
Matplotlib: Matplotlib is customizable and powerful.
Seaborn: Seaborn will avoid a ton of boilerplate by providing default theme which are commonly used.
6. Use Cases:
Matplotlib: Pandas will use Matplotlib.
It is also neat wrapper around Matplotlib.
SeabornSeaborn is used for more specific use cases and also it is Matplotlib under the hood.
Also it is specially meant for statistical plotting.

##########################################################################


PLOTTING TIP

For categorical variables utilize Bar Charts* and Boxplots.
For continuous variables utilize Histograms, Scatterplots, Line graphs, and Boxplots.