From: <md...@us...> - 2008-06-05 19:14:55
|
Revision: 5405 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5405&view=rev Author: mdboom Date: 2008-06-05 12:14:53 -0700 (Thu, 05 Jun 2008) Log Message: ----------- Close polygons. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/patches.py Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-06-05 17:33:24 UTC (rev 5404) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-06-05 19:14:53 UTC (rev 5405) @@ -540,6 +540,9 @@ See Patch documentation for additional kwargs """ Patch.__init__(self, **kwargs) + xy = np.asarray(xy, np.float_) + if len(xy) and xy[0] != xy[-1]: + xy = np.concatenate([xy, [xy[0]]]) self._path = Path(xy) __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |