matplotlib使用scatter画简单的散点图

来源:互联网 发布:windows live下载地址 编辑:程序博客网 时间:2024/04/28 16:17

利用matplotlib画简单的直线图和散点图

import matplotlib.pyplot as pltfrom numpy import *x = [1, 2, 1, 3, 2, 3]y = [3, 3, 2, 2, 1, 1]x2 = arange(0, 4.0, 0.1)y2 = x2plt.scatter(x, y)plt.plot(x2, y2)plt.show()

这里写图片描述

http://stackoverflow.com/questions/10336614/scatter-plot-in-matplotlib

0 0
原创粉丝点击