# HG changeset patch # User Nicolas Saunier # Date 1418164034 18000 # Node ID aee4cbac9e0ee57648a2389de150ed039c5e026f # Parent 17b02c8054d01e7afe9df6aaedc6264a67c7ca5c corrected bug to plot trajectories on world image (the norm on image coordinates seems to have changed in matplotlib) diff -r 17b02c8054d0 -r aee4cbac9e0e python/moving.py --- 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]