Mercurial > hg > nsaunier > traffic-intelligence
comparison python/moving.py @ 343:74e437ab5f11
first version of indicator loading code
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 21 Jun 2013 15:28:59 -0400 |
| parents | 9c1818a71c9c |
| children | fa64b2e3a64f |
comparison
equal
deleted
inserted
replaced
| 342:4d69486869a5 | 343:74e437ab5f11 |
|---|---|
| 396 self.positions[0].append(x) | 396 self.positions[0].append(x) |
| 397 self.positions[1].append(y) | 397 self.positions[1].append(y) |
| 398 | 398 |
| 399 def addPosition(self, p): | 399 def addPosition(self, p): |
| 400 self.addPositionXY(p.x, p.y) | 400 self.addPositionXY(p.x, p.y) |
| 401 | |
| 402 def duplicateLastPosition(self): | |
| 403 self.positions[0].append(self.positions[0][-1]) | |
| 404 self.positions[1].append(self.positions[1][-1]) | |
| 401 | 405 |
| 402 @staticmethod | 406 @staticmethod |
| 403 def _draw(positions, options = '', withOrigin = False, lastCoordinate = None, timeStep = 1, **kwargs): | 407 def _draw(positions, options = '', withOrigin = False, lastCoordinate = None, timeStep = 1, **kwargs): |
| 404 from matplotlib.pylab import plot | 408 from matplotlib.pylab import plot |
| 405 if lastCoordinate == None: | 409 if lastCoordinate == None: |
