python matplotlib绘图
来源:互联网 发布:2010年总决赛数据 编辑:程序博客网 时间:2024/06/06 19:37
import matplotlib import matplotlib.pyplot as plt import random# generate 2 dimension pointsd = 2xmax = 20num_points = 10points = [[random.randint(0,xmax) for i in xrange(d)] for j in xrange(num_points)]print pointsplt.figure(1)plt.subplot(211)for point in points[:num_points]:plt.scatter(point[0], point[1])# seed the dataset with a fixed number of nearest neighbours# within a given small "radius"num_neighbours = 2radius = 0.1for point in points[:num_points]: for i in xrange(num_neighbours): points.append([x+random.uniform(-radius,radius) for x in point])print pointsplt.subplot(212)for point in points:plt.scatter(point[0], point[1])plt.show()
阅读全文
0 0
- 绘图: Python matplotlib简介
- python使用matplotlib绘图
- python matplotlib包 绘图
- Python:使用Matplotlib绘图
- Python中Matplotlib绘图
- python使用matplotlib绘图
- python-matplotlib绘图
- Python--Matplotlib绘图库
- matplotlib python绘图
- python matplotlib绘图
- 【Python】【matplotlib】绘图
- 【Python】【matplotlib】绘图函数
- python中的matplotlib绘图问题
- python使用matplotlib绘图 -- barChart
- 【Python】Matplotlib绘图库初探
- python使用matplotlib绘图 -- barChart
- 使用 python Matplotlib 库绘图
- 使用 python Matplotlib 库绘图
- AE二次开发利用ITopologicalOperator实现空间几何运算
- 别让这7个常犯的错误毁了你的设计
- 值得推荐的C/C++框架和库
- 剑指Offer_面试题11_数值的整数次方
- Struts2.x基本介绍及开发环境搭建
- python matplotlib绘图
- 集合问题
- 工作中git使用的笔记
- s3c2440添加ds18b20驱动
- 开发过程中出现的bug以及原因
- HDU
- Sublime Text3配置python交互模式
- UI设计师简历填写小技巧
- Linux常用命令(持续更新中)