Artist default alpha value

All,

I have a question regarding the default alpha value for an Artist.
Why is it 1.0 instead of None? The color conversion code takes into
account if alpha is None and having it default to something other than None
makes it impossible for any Patch to have a fill_color specified as an RGBA
value (and possibly other Artist sub-classes). Should this be something
else, or should the Patch.set_facecolor method pre-process the incoming color
value and set any specified alpha as appropriate (I hope not since this would
cause the color value to be processed several times)?

Thanks,

–James Evans

James Evans wrote:

All,

I have a question regarding the default alpha value for an Artist. Why is it 1.0 instead of None? The color conversion code takes into account if alpha is None and having it default to something other than None makes it impossible for any Patch to have a fill_color specified as an RGBA value (and possibly other Artist sub-classes). Should this be something else, or should the Patch.set_facecolor method pre-process the incoming color value and set any specified alpha as appropriate (I hope not since this would cause the color value to be processed several times)?

James,

This is just an aspect of the general mess that is alpha-handling in mpl. Sometime, maybe a year ago, I thought it would be easy to fix at least some of the problems by changing the default Artist alpha to None. It turned out to be not that simple, I ran out of time and patience, and dropped it. Perhaps some other changes in the interim have made it so that changing the Artist initial value now would be simpler, but I suspect it will still have to be done as part of a deeper overhaul, if not the full overhaul that would be most desirable.

Eric

···

Thanks,

--James Evans