from macslib import * import time # this converts string dates MM/DD/YYYY to the number of days global dateStart dateStart = None def dateStringToNum(dateStr): global dateStart date = time.strptime(dateStr,'%m/%d/%Y') if dateStart == None: dateStart = date return 365*(date.tm_year - dateStart.tm_year) + (date.tm_yday - dateStart.tm_yday) # the plotting starts here :) allDays, allTemps = loadData('meanDailyTemp',converters={0:dateStringToNum}) daysToPlot = allDays[::7] # What do you think this does? tempsToPlot = allTemps[::7] # What do you think this does? drawPoints( daysToPlot, tempsToPlot, connect=True )