an introduction
Scatter plot is a common method for analyzing data correlation. The following code uses random numbers to generate numerical values, then generates a scatter plot, and calculates the size of the scatter points according to the magnitude of the values.
two code
import matplotlib.pylab as pl
import numpy as np
x = np.random.random(100)
y = np.random.random(100)
#s指大小,c指颜色,marker指符号形状
pl.scatter(x,y,s=x*500,c=u'r',marker=u'*')
pl.show()
Three running results