Revision: 8016 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8016&view=rev Author: heeres Date: 2009-12-10 00:09:03 +0000 (Thu, 10 Dec 2009)
Log Message: ----------- Mplot3d: fix scatter3d markers bug Modified Paths: -------------- branches/v0_99_maint/lib/mpl_toolkits/mplot3d/art3d.py Modified: branches/v0_99_maint/lib/mpl_toolkits/mplot3d/art3d.py =================================================================== --- branches/v0_99_maint/lib/mpl_toolkits/mplot3d/art3d.py 2009-12-10 00:03:03 UTC (rev 8015) +++ branches/v0_99_maint/lib/mpl_toolkits/mplot3d/art3d.py 2009-12-10 00:09:03 UTC (rev 8016) @@ -240,6 +240,7 @@ def __init__(self, *args, **kwargs): PatchCollection.__init__(self, *args, **kwargs) + self._old_draw = lambda x: PatchCollection.draw(self, x) def set_3d_properties(self, zs, zdir): xs, ys = zip(*self.get_offsets()) @@ -259,10 +260,15 @@ return min(vzs) def draw(self, renderer): - PatchCollection.draw(self, renderer) + self._old_draw(renderer) def patch_collection_2d_to_3d(col, zs=0, zdir='z'): """Convert a PatchCollection to a Patch3DCollection object.""" + + # The tricky part here is that there are several classes that are + # derived from PatchCollection. We need to use the right draw method. + col._old_draw = col.draw + col.__class__ = Patch3DCollection col.set_3d_properties(zs, zdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins