数据挖掘系列:绘制散点图(matplotlib)

2019-03-11 14:04:05 浏览数 (1)

代码语言:javascript复制
import matplotlib.pyplot as plt
import numpy as np

x = ["hubei","huangshi","wuhang","beijing","shanghai","hubei","hubei","wuhang"]
y = [6,7,8,9,10,2,9,6]
plt.plot(x, y, 'o', color='black')

n = ["hubei","huangshi","wuhang","beijing","shanghai","hubei","hubei","wuhang"]
m = [3,1,5,4,7,3,3,2]
plt.plot(n, m, 'x', color='red')

0 人点赞