首页 > 其他 > 详细

标准输入到绘图过滤器(plotfilter.py)

时间:2017-08-03 14:42:58      阅读:245      评论:0      收藏:0      [点我收藏+]
 1 import stddraw
 2 import stdio
 3 # Read and set the x- and y- scales
 4 x0 = stdio.readFloat()
 5 y0 = stdio.readFloat()
 6 x1 = stdio.readFloat()
 7 y1 = stdio.readFloat()
 8 stddraw.setXscale(x0, x1)
 9 stddraw.setYscale(y0, y1)
10 # Read and plot the points
11 stddraw.setPenRadius(0.0)
12 while not stdio.isEmpty():
13     x = stdio.readFloat()
14     y = stdio.readFloat()
15     stddraw.point(x, y)
16 stddraw.show()

技术分享

 

 技术分享

 

标准输入到绘图过滤器(plotfilter.py)

原文:http://www.cnblogs.com/cdf4745/p/7279316.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!