diff python/utils.py @ 940:d8ab183a7351

verified motion prediction with prototypes at constant speed (test needed)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 18 Jul 2017 13:46:17 -0400
parents c7e72d758049
children 5d788d2e8ffc
line wrap: on
line diff
--- a/python/utils.py	Mon Jul 17 17:56:52 2017 -0400
+++ b/python/utils.py	Tue Jul 18 13:46:17 2017 -0400
@@ -836,14 +836,11 @@
 # plotting section
 #########################
 
-def plotPolygon(poly, options = ''):
+def plotPolygon(poly, options = '', **kwargs):
     'Plots shapely polygon poly'
-    from numpy.core.multiarray import array
     from matplotlib.pyplot import plot
-    from shapely.geometry import Polygon
-
-    tmp = array(poly.exterior)
-    plot(tmp[:,0], tmp[:,1], options)
+    x,y = poly.exterior.xy
+    plot(x, y, options, **kwargs)
 
 def stepPlot(X, firstX, lastX, initialCount = 0, increment = 1):
     '''for each value in X, increment by increment the initial count