Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 41:eb78c6edc0c8
added drawing for Point
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Fri, 28 May 2010 20:25:45 -0400 |
parents | 9f16aee24b7e |
children | 6d11d9e7ad4e |
line wrap: on
line diff
--- a/python/moving.py Wed May 19 19:47:02 2010 -0400 +++ b/python/moving.py Fri May 28 20:25:45 2010 -0400 @@ -141,6 +141,10 @@ ''' return Point(self.x-other.x, self.y-other.y) + def draw(self, options = ''): + from matplotlib.pylab import plot + plot([self.x], [self.y], 'x'+options) + def norm2Squared(self): '''2-norm distance (Euclidean distance) >>> Point(3,2).norm2Squared()