Matplotlib and Seaborn demo Python visualization

Data visualization : It is the use of graphical charts and other methods to present data. Graphic charts can efficiently and clearly express the information contained in the data.

Seaborn is based on matplotlib, and has a more advanced API package based on matplotlib, so that users can make various attractive statistical charts more easily.

It can be said that seaborn is a good complement to matplotlib, and it is highly compatible with numpy and pandas data structures and scipy and statsmodels and other statistical models.

Installation: pip install seaborn

     Seaborn is a library for making attractive and informative statistical graphics in Python. It is built on matplotlib and is tightly integrated with the PyData stack, including support for numpy and pandas data structures and statistical routines from scipy and statsmodels . Seaborn aims to use visualization as a core part of exploring and understanding data. Plotting functions operate on data frames and arrays that contain the entire data set, and perform the necessary aggregation and statistical model fitting internally to generate an information graph. If matplotlib "trying to keep things simple and easy to difficult to achieve", seaborn will try to map the set of clear solutions to make things easier. Seaborn can be considered as a supplement to matplotlib, not its replacement. It can perform well in data visualization.

 

 

Classification statistic chart

(1) statistical histogram barplot (mean and confidence interval)
(2) gray histogram countplot
(3) point graph pointplot (mean and confidence interval)


Classification scatterplot
When one-dimensional data is classification data, the scatterplot becomes a strip shape:
(1) route map stripplot, set parameters to add jitter method jitter = True (direct display of points)
(2) generate bee colony plot swarmplot to avoid scatter overlap (direct display of dots)


Classification distribution diagram
(1) boxplot: upper and lower edges, upper and lower quartiles, median (approximate distribution)
(2.1) violinplot: box plot + KDE ((approximate distribution))
(2.2) asymmetric Fiddle picture: split = True parameter in violinplot


Classification statistics sub-picture
(1) sub-graph of single classification standard factorplot
(2) sub-graph of multi- classification standard PairGrid

 

 

 

Guess you like

Origin www.cnblogs.com/1314520xh/p/12688408.html