Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-24 Thread Eric Firing
Michael Droettboom wrote: > Jouni K. Seppänen wrote: >> Eric Firing writes: >> >>> John Hunter wrote: >>> One possibility would be to have a facecolor/edgecolor property on the gc itself, which would be rgba tuples. Since the gc is almost entirely internal, we can revamp it

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-24 Thread Michael Droettboom
Jouni K. Seppänen wrote: > Eric Firing writes: > >> John Hunter wrote: >> >>> One possibility would be to have a facecolor/edgecolor property on >>> the gc itself, which would be rgba tuples. Since the gc is almost >>> entirely internal, we can revamp it w/o affecting userland code, >>> th

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-24 Thread Jouni K . Seppänen
Eric Firing writes: > John Hunter wrote: >> One possibility would be to have a facecolor/edgecolor property on >> the gc itself, which would be rgba tuples. Since the gc is almost >> entirely internal, we can revamp it w/o affecting userland code, >> though it would be nice to support legacy meth

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Jae-Joon Lee
> > This was causing havoc in contourf; I don't see the logic of multiplying a > previous alpha by a new one. Consider a following example that you want to have different alpha for edgecolor and face color (of course this does not work as of now), Circle((1, 1), 0.5, ec=(1, 1, 1, 0.2), fc=(1, 0,

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Eric Firing
John Hunter wrote: > > > On Mon, Mar 23, 2009 at 3:24 PM, Jae-Joon Lee > wrote: > > The example (e) in my previous script have a code and a text label > mismatched. > I'm attaching the corrected one. > > I took a more look on how a patch is drawn. >

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread John Hunter
On Mon, Mar 23, 2009 at 3:24 PM, Jae-Joon Lee wrote: > The example (e) in my previous script have a code and a text label > mismatched. > I'm attaching the corrected one. > > I took a more look on how a patch is drawn. > the draw() method of a patch calls draw_path method of the renderer, > which

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Eric Firing
Jae-Joon Lee wrote: > > Thanks for the explanation. > I personally think that the default behavior for setting alpha is > better to be multiplying with the previous one, instead of overriding. This was causing havoc in contourf; I don't see the logic of multiplying a previous alpha by a new one

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Jae-Joon Lee
The example (e) in my previous script have a code and a text label mismatched. I'm attaching the corrected one. I took a more look on how a patch is drawn. the draw() method of a patch calls draw_path method of the renderer, which seems to be responsible for both "fill", and "stroke". But there is

Re: [matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Eric Firing
Jae-Joon Lee wrote: > Hi, > > When drawing a patch, the alpha value of its edgeolor is ignored. The > following command draw a circle whose edgecolor has alpha=1, instead > of 0.1. > > > gca().add_patch(Circle((0.5, 0.5), 0.3, >ec=(1,0,0,0.1), fc="none")) > > > Attached

[matplotlib-devel] patches have incorrect alpha values

2009-03-23 Thread Jae-Joon Lee
Hi, When drawing a patch, the alpha value of its edgeolor is ignored. The following command draw a circle whose edgecolor has alpha=1, instead of 0.1. gca().add_patch(Circle((0.5, 0.5), 0.3, ec=(1,0,0,0.1), fc="none")) Attached is a little test script and its output. It