changeset 620:aee4cbac9e0e

corrected bug to plot trajectories on world image (the norm on image coordinates seems to have changed in matplotlib)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 09 Dec 2014 17:27:14 -0500
parents 17b02c8054d0
children 582508610572
files python/moving.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/python/moving.py	Sun Dec 07 22:59:47 2014 -0500
+++ b/python/moving.py	Tue Dec 09 17:27:14 2014 -0500
@@ -684,11 +684,10 @@
     def plotAt(self, lastCoordinate, options = '', withOrigin = False, timeStep = 1, **kwargs):
         Trajectory._plot(self.positions, options, withOrigin, lastCoordinate, timeStep, **kwargs)
 
-    def plotOnWorldImage(self, nPixelsPerUnitDistance, imageHeight, options = '', withOrigin = False, timeStep = 1, **kwargs):
-        from matplotlib.pylab import plot
+    def plotOnWorldImage(self, nPixelsPerUnitDistance, options = '', withOrigin = False, timeStep = 1, **kwargs):
         imgPositions = [[x*nPixelsPerUnitDistance for x in self.positions[0]],
-                        [-x*nPixelsPerUnitDistance+imageHeight for x in self.positions[1]]]
-        Trajectory._plot(imgPositions, options, withOrigin, timeStep, **kwargs)
+                        [x*nPixelsPerUnitDistance for x in self.positions[1]]]
+        Trajectory._plot(imgPositions, options, withOrigin, None, timeStep, **kwargs)
 
     def getXCoordinates(self):
         return self.positions[0]