Visualization of Python Data Analysis-Data Visualization with Seaborn (0) General Chapter


Reference source: Seaborn official document

1. Introduction & Framework

1.1 The relationship between Seaborn and Matplotlib

  1. Matplotlib is a practical and popular data visualization tool;
  2. Seaborn is a powerful API developed on the basis of Matplotlib, which is very convenient; to
    put it bluntly, Matplotlib is the bottom layer of Seaborn.

1.2 Advantages of Seaborn

  1. Have more and more modern styles and artistic effects;
  2. Added more statistical-based, simpler and more convenient advanced functions;
  3. Can be seamlessly combined with Pandas DataFrame.

Attachment: Comparison of drawing styles

  • Matplotlib drawing style:
    Insert picture description here
  • seaborn drawing style (default):
    Insert picture description here
  • Seaborn drawing style (after setting the style):
sns.set()  # 默认 style='darkgrid'

Note: Once sns.set() is set, it will be changed globally, only restart can be modified (also pay attention to the difference between matplotlib and seaborn)
Insert picture description here

1.3 Framework (understanding)

The whole article is divided into three parts:
1. Plotting functions
2. Multi-plot grids
3. Plot aesthetics

At present, I mainly focus on the first part. The plotting functions include the relplot() function for most continuous numerical variable operations, and the catplot() for a large amount of categorical (discrete) data. The second and third parts need to be improved. .

2. Drawing functions

2.1 Visualized statistical relationship

2.1 Visualized statistical relationship: sns.relplot()

Mainly the relationship analysis function sns.relplot()]

2.2 Visualizing classification data

2.2 Visualizing classification data: sns.catplot()

Mainly the classification visualization function sns.catplot()

2.3 Data distribution of visualized data set

2.3 Data distribution of visualized data set

Mainly univariate analysis function distplot(), binary distribution function jointplot() and matrix graph pairplot()

2.4 Visualizing linear relationships

2.4 Visualizing linear relationships

Mainly regplot() and lmplot() functions.

3. Multi-image grid

4. Image aesthetics/drawing settings

5. Summary

reference:

Seaborn official website tutorial

Guess you like

Origin blog.csdn.net/Robin_Pi/article/details/103948005