Introduction URL: Https://www.kaggle.com/benhamner/d/uciml/iris/python-data-visualizations/notebook
Import Matplotlib.pyplot as Plt
Import Seaborn as SNS
Import Pandas as PD
Import data:
Iris=pd.read_csv (' E:\\data\\iris.csv ')
Iris.head ()
To make a histogram:
Plt.hist (iris[' SEPALLENGTHCM '],bins=15)
Plt.xlabel (' SEPALLENGTHCM ')
Plt.ylabel (' quantity ')
Plt.title (' Distribution of SEPALLENGTHCM ')
Plt.show ()
To make a scatter plot:
But such a diagram does not indicate the color of the different kinds of words = flowers. So we use another way to sort by species.
Violin chart
Box-type diagram:
Ax=sns.boxplot (x= "species", y= "SEPALWIDTHCM", Data=iris)
The use of jitter=true here makes a little bit less of the vertical line in the middle.
Ax=sns.boxplot (x= "species", y= "SEPALWIDTHCM", Data=iris)
Ax=sns.stripplot (x= "species", y= "SEPALWIDTHCM", data=iris,jitter=true,edgecolor= "gray")
Kdeplot: The linkage between univariate variables and the potential characteristics of the variables assessed by a kernel density
Displays the links between the two variables:
Diag_kind= ' KDE ' shows the kernel density between the two variables and uses it to estimate its characteristics
Boxplot_1: Separate features between variables by species
Andrews curves: Andrew Curve uses the properties of the sample as coefficients of the Fourier transform
Radviz: Multivariate visualization, where each feature is displayed on a plane, and the sample is connected to the image by the dots on the circle
Parallel_coordinates multi-variable visualization with parallel coordinates: For each feature of a data sample, we set the feature on the axis and draw a line.
Python Data analysis and visualization