Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/indicators.py @ 1125:b358bed29ab4
updates and bugs
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 30 Jan 2020 10:17:07 -0500 |
parents | 956a66096e91 |
children | bb14f919d1cb |
comparison
equal
deleted
inserted
replaced
1118:234e2228fd30 | 1125:b358bed29ab4 |
---|---|
72 return self.timeInterval | 72 return self.timeInterval |
73 | 73 |
74 def getName(self): | 74 def getName(self): |
75 return self.name | 75 return self.name |
76 | 76 |
77 def getValues(self): | 77 def getValues(self, withNone = True): |
78 return [self.__getitem__(t) for t in self.timeInterval] | 78 result = [self.__getitem__(t) for t in self.timeInterval] |
79 if withNone: | |
80 return result | |
81 else: | |
82 return [x for x in result if x is not None] | |
83 | |
84 def getInstants(self): | |
85 return list(self.values.keys()) | |
79 | 86 |
80 def plot(self, options = '', xfactor = 1., yfactor = 1., timeShift = 0, **kwargs): | 87 def plot(self, options = '', xfactor = 1., yfactor = 1., timeShift = 0, **kwargs): |
81 if self.getTimeInterval().length() == 1: | 88 if self.getTimeInterval().length() == 1: |
82 marker = 'o' | 89 marker = 'o' |
83 else: | 90 else: |