Tony S Yu wrote:
> Currently, Arc in matplotlib.patches requires that it be called with  
> kwarg ``fill=False``. Was this behavior intentional? The code suggests  
> that a default value was left out of the kwarg lookup.
> 
> I've attached a simple patch to fix this (it still fails when fill set  
> to True).

Thanks. I committed a slightly different fix.  I think this handles all 
possibilities.

--- a/matplotlib/lib/matplotlib/patches.py      Mon May 25 00:00:46 2009 +0000
+++ b/matplotlib/lib/matplotlib/patches.py      Mon May 25 00:16:44 2009 +0000
@@ -1189,10 +1189,9 @@

          %(Patch)s
          """
-        fill = kwargs.get('fill')  # returns None if key is absent
+        fill = kwargs.setdefault('fill', False)
          if fill:
              raise ValueError("Arc objects can not be filled")
-        kwargs['fill'] = False

          Ellipse.__init__(self, xy, width, height, angle, **kwargs)

Eric

> 
> Cheers,
> -Tony
> 
> Index: lib/matplotlib/patches.py
> ===================================================================
> --- lib/matplotlib/patches.py (revision 7137)
> +++ lib/matplotlib/patches.py (working copy)
> @@ -1189,7 +1189,7 @@
> 
>           %(Patch)s
>           """
> -        fill = kwargs.pop('fill')
> +        fill = kwargs.pop('fill', False)
>           if fill:
>               raise ValueError("Arc objects can not be filled")
>           kwargs['fill'] = False
> 
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to