Python-图形绘制

matplotlib 绘图

散点图

1
2
3
4
5
6
7
8
9
10
import matplotlib.pyplot as plt

def draw_scatter():
np.random.seed(10)
x = np.arange(0, 20)
y = np.arange(0, 20) + np.random.randint(low=0, high=5, size=20)
plt.scatter(x, y)
plt.show()

draw_scatter()

fig01

Thanks for rewarding