View difference between Paste ID: cyGMnx3E and QCfAsSfd
SHOW: | | - or go back to the newest paste.
1-
import string, re,pylab
1+
import string, re, pylab
2
3
xAxis=[]
4
yAxis=[]
5
6
def loadData():
7
    dataFile=open('julyTemps.5ee3cdb7fafe.txt', 'r', 0)
8
    for line in dataFile:
9
        for c in string.digits:
10
            if re.match(c, line):
11
                xAxis.append(line.split()[0])
12
                yAxis.append(line.split()[1])
13
    dataFile.close()
14
loadData()
15
16
def makePlot():
17
    pylab.figure(1)
18
    pylab.title('Boston July Highest Temperatures')
19
    pylab.xlabel('Day')
20
    pylab.ylabel('Highest Temperature (F)')
21
    pylab.plot(xAxis, yAxis, 'r', linewidth=3)
22
    pylab.show()
23
makePlot()