Mercurial > hg > nsaunier > traffic-intelligence
comparison python/pavement.py @ 432:4970fa64f636
minor
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 28 Nov 2013 00:48:24 -0500 |
| parents | 0bcfa49d179a |
| children | d40ad901b272 |
comparison
equal
deleted
inserted
replaced
| 431:0bcfa49d179a | 432:4970fa64f636 |
|---|---|
| 16 self.paintingType = paintingType | 16 self.paintingType = paintingType |
| 17 self.color = color | 17 self.color = color |
| 18 self.data = data | 18 self.data = data |
| 19 self.nMeasures = len(data) | 19 self.nMeasures = len(data) |
| 20 | 20 |
| 21 def plot(self, measure, dayRatio = 1.): | 21 def plot(self, measure, options = 'o', dayRatio = 1., **kwargs): |
| 22 from matplotlib.pyplot import plot | 22 from matplotlib.pyplot import plot |
| 23 plot(self.data['jours']/float(dayRatio), | 23 plot(self.data['jours']/float(dayRatio), |
| 24 self.data[measure]) | 24 self.data[measure], options, **kwargs) |
| 25 | 25 |
| 26 def plotRetroreflectivity(self, dayRatio = 1.): | 26 def plotRetroreflectivity(self, options = 'o', dayRatio = 1., **kwargs): |
| 27 for i in range(1,7): | 27 for i in range(1,7): |
| 28 self.plot('retro_{}'.format(i), dayRatio) | 28 self.plot('retro_{}'.format(i), options, dayRatio, **kwargs) |
| 29 | 29 |
| 30 def plotDurability(self, dayRatio = 1.): | 30 def plotDurability(self, options = 'o', dayRatio = 1., **kwargs): |
| 31 for i in range(1,7): | 31 for i in range(1,7): |
| 32 self.plot('dur_{}'.format(i), dayRatio) | 32 self.plot('dur_{}'.format(i), options, dayRatio, **kwargs) |
