• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
boooobao
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2017年3月12日

3.3 漂亮的正弦函数图图像
摘要: import matplotlib.pyplot as pl import numpy as np from pylab import * x= np.linspace(-np.pi,np.pi,256,endpoint=True) y=np.cos(x) y1=np.sin(x) pl.plot(x,y) pl.plot(x,y1) title("Functons sin and $\c... 阅读全文
posted @ 2017-03-12 22:52 boooobao 阅读(743) 评论(0) 推荐(0)
 
3.2 定义图表类型 生成箱线图
摘要: from pylab import * dataset=[123,152,148,123,195,134,176,189,156,124,142,186,149,135,186,125,172,179,168,193] subplot(121) boxplot(dataset,) subplot(122) hist(dataset) show() 阅读全文
posted @ 2017-03-12 00:28 boooobao 阅读(194) 评论(0) 推荐(0)
 
3.2 定义图表类型
摘要: 1 from matplotlib.pyplot import * 2 x = [1, 2, 3, 4] 3 y = [5, 4, 3, 2] 4 5 figure() 6 subplot(231) 7 plot(x,y) 8 9 subplot(232) 10 bar(x,y) 11 12 subplot(233) 13 barh(x,y) 14 15 subplot... 阅读全文
posted @ 2017-03-12 00:00 boooobao 阅读(173) 评论(0) 推荐(0)
 
 

2017年3月5日

2.13生成可控的随机数据集合 生成九个分布的直方图
摘要: import random import matplotlib import matplotlib.pyplot as plt size=1000 bucket=100 plt.figure() matplotlib.rcParams.update({'font.size': 7}) plt.subplot(621) plt.xlabel("random.random") res = [ra... 阅读全文
posted @ 2017-03-05 19:35 boooobao 阅读(276) 评论(0) 推荐(0)
 
2.13生成可控的随机数据集合 通过正态分布 模拟虚拟价格增长数据
摘要: 模拟色子 import pylab import random duration= 100 mean_inc= 0.2 std_dev_inc= 1.2 x=range(duration) y=[] pricetoday = 0 for i in x: next_data = random.normalvariate(mean_inc, std_dev_inc) priceto... 阅读全文
posted @ 2017-03-05 17:19 boooobao 阅读(211) 评论(0) 推荐(0)
 
2.13生成可控的随机数据集合 模拟色子
摘要: import pylab import random SIZE = 10000 random.seed() real_rand_vars = [] real_rand_vars = [random.randint(1,7) for val in xrange(SIZE)] pylab.hist(real_rand_vars, 10) pylab.xlabel("dashed") pylab... 阅读全文
posted @ 2017-03-05 17:18 boooobao 阅读(220) 评论(0) 推荐(0)
 
 

2017年3月4日

使用 VScode 配置 c++
摘要: http://blog.csdn.net/c_duoduo/article/details/51615381 大神写的超级详细 阅读全文
posted @ 2017-03-04 22:27 boooobao 阅读(150) 评论(0) 推荐(0)
 
 

2017年3月1日

导入图像 +pil
摘要: import numpy import Image import matplotlib.pyplot as plt bug = Image.open('''C:\Users\lenovo\Desktop\dcim\P60221-174849.jpg''') arr= numpy.array(bug.getdata(),numpy.uint8).reshape(bug.size[1],bug.s... 阅读全文
posted @ 2017-03-01 16:40 boooobao 阅读(392) 评论(0) 推荐(0)
 
2.12 导入图像数据到numpy 1 看看自带的图片
摘要: import scipy.misc import matplotlib.pyplot as plt lena = scipy.misc.face() plt.gray() plt.imshow(lena) plt.colorbar() print lena.shape print lena.max() print lena.dtype plt.show() 阅读全文
posted @ 2017-03-01 15:51 boooobao 阅读(442) 评论(0) 推荐(0)
 
 

2017年2月27日

2.11 读取流数据源
摘要: import timeimport osimport sysif len(sys.argv)!=2: print >> sys.stderr ,"Please specify filename to read"filename = sys.argv[1]if not os.path.isfile(f 阅读全文
posted @ 2017-02-27 22:58 boooobao 阅读(153) 评论(0) 推荐(0)
 
 
下一页

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3