首页 > 其他 > 详细

Hole puncher Show Picture

时间:2015-09-27 21:23:49      阅读:323      评论:0      收藏:0      [点我收藏+]
import sys
reload(sys)
sys.setdefaultencoding(‘utf8‘)

import matplotlib.pyplot as plt
import string

file = open("GD.txt")

i = 0
x = range(0)
y = range(0)

for line in file:
    x.append(string.atoi(line[0:7], 10))
    y.append(string.atoi(line[8:], 10))

print x[1]
print "111111111111"
#print y



# plt.xlabel("x position")
# plt.ylabel("y position")
# plt.title("E track distribution diagram \n Red point is start and Blue point is end.")  
#plt.plot(x,y)




plt.plot(x, y, ‘k--‘, linewidth=1, linestyle="-.")
for i in range(94):
      plt.plot(x[i], y[i], ‘yo-‘, linewidth=1) 

plt.plot(x[0], y[0], ‘r*‘,  linewidth=10)
plt.plot(x[94], y[94], ‘b*‘,  linewidth=10)

plot(x, y)   # plot x and y using blue circle markers
plt.show() 

  

import string
import matplotlib.pyplot as plt  
import numpy as np

file = open("picture.txt")

i = 0
x = range(0)
y = range(0)

for line in file:
    x.append(string.atoi(line[0:7], 10))
    y.append(string.atoi(line[8:], 10))


years = x
price = y

plt.plot(years, price, ‘b*‘)    #,label=$cos(x^2)$)
plt.plot(years, price, ‘r‘)
plt.xlabel(years(+2000))
plt.ylabel("housing average price(*2000 yuan)")
plt.ylim(0, 15)
plt.title(‘line_regression & gradient decrease‘)
plt.legend()
plt.show()

   Hole puncher

Hole puncher Show Picture

原文:http://www.cnblogs.com/hgonlywj/p/4842714.html

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