From: <md...@us...> - 2008-06-06 12:08:09
|
Revision: 5409 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5409&view=rev Author: mdboom Date: 2008-06-06 05:07:53 -0700 (Fri, 06 Jun 2008) Log Message: ----------- Fix bug in recent PolyCollection sizing change. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/collections.py Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2008-06-06 03:45:57 UTC (rev 5408) +++ trunk/matplotlib/lib/matplotlib/collections.py 2008-06-06 12:07:53 UTC (rev 5409) @@ -492,7 +492,7 @@ renderer.close_group(self.__class__.__name__) class PolyCollection(Collection): - def __init__(self, verts, sizes = (1, ), **kwargs): + def __init__(self, verts, sizes = None, **kwargs): """ verts is a sequence of ( verts0, verts1, ...) where verts_i is a sequence of xy tuples of vertices, or an equivalent @@ -518,10 +518,11 @@ def draw(self, renderer): # sizes is the area of the circle circumscribing the polygon # in points^2 - self._transforms = [ - transforms.Affine2D().scale( - (np.sqrt(x) * renderer.dpi / 72.0)) - for x in self._sizes] + if self._sizes is not None: + self._transforms = [ + transforms.Affine2D().scale( + (np.sqrt(x) * renderer.dpi / 72.0)) + for x in self._sizes] return Collection.draw(self, renderer) class BrokenBarHCollection(PolyCollection): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |