Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import string, re, pylab
- xAxis=[]
- yAxis=[]
- def loadData():
- dataFile=open('julyTemps.5ee3cdb7fafe.txt', 'r', 0)
- for line in dataFile:
- for c in string.digits:
- if re.match(c, line):
- xAxis.append(line.split()[0])
- yAxis.append(line.split()[1])
- dataFile.close()
- loadData()
- def makePlot():
- pylab.figure(1)
- pylab.title('Boston July Highest Temperatures')
- pylab.xlabel('Day')
- pylab.ylabel('Highest Temperature (F)')
- pylab.plot(xAxis, yAxis, 'r', linewidth=3)
- pylab.show()
- makePlot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement