On 11/04/2010 02:38 PM, Jae-Joon Lee wrote:
> On Fri, Nov 5, 2010 at 9:19 AM, Jae-Joon Lee<lee.j.j...@gmail.com>  wrote:
>> Eric, it seems to be happened because the "_original_facecolor"
>> property that you introduced is not initialized in __init__ method but
>> in the set_facecolor method. Is there any reason that this cannot be
>> initialized in the __init__ method?
>>

As you found, it is initialized in the __init__ method when 
set_facecolor is called there.  In general, I like using the "set" 
methods in __init__ when possible so as to reduce code duplication, and 
so as to make the setting of a parameter work the same with a "set" 
method as it does upon initialization.

>
> Just to clarify, I first thought it is better to be initialized in the
> __init__ method (since then you don't need to worry about it when you
> override set_facecolor method), but after second thought, this may not
> be necessary.

It looks to me like your fix of the demo is the correct way to handle 
the problem.

Eric

>
> -JJ
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to