Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: Scott Ransom <sransom@nr...>  20060827 15:27:25

Hi All, I'm using matplotlib (with agg backends) from recent svn: In [63]: matplotlib.__version__ Out[63]: '0.87.4' and I can't seem to get contour() or contourf() to utilize the alpha keyword. No matter what value I set, alpha=1.0 on the output. Alpha in general works fine, as the scatter_demo2.py example gives very nicely alphachanneled output. Any ideas? Thanks a bunch, Scott   Scott M. Ransom Address: NRAO Phone: (434) 2960320 520 Edgemont Rd. email: sransom@... Charlottesville, VA 22903 USA GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 
From: Eric Firing <efiring@ha...>  20060831 17:51:01

Scott, Please send a minimal example that I can use as a test case. This sounds vaguely familiar. Thanks. Eric Scott Ransom wrote: > Hi All, > > I'm using matplotlib (with agg backends) from recent svn: > > In [63]: matplotlib.__version__ > Out[63]: '0.87.4' > > and I can't seem to get contour() or contourf() to utilize the > alpha keyword. No matter what value I set, alpha=1.0 on the > output. Alpha in general works fine, as the scatter_demo2.py > example gives very nicely alphachanneled output. > > Any ideas? Thanks a bunch, > > Scott > 
From: Scott Ransom <sransom@nr...>  20060831 19:09:57

Hi Eric, This shows what I'm talking about:  from pylab import * delta = 0.025 x = arange(3.0, 3.0, delta) y = arange(2.0, 2.0, delta) X, Y = meshgrid(x, y) Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) # difference of Gaussians Z = 10.0 * (Z2  Z1) contourf(X, Y, sin(Y)*cos(X), alpha=0.2) hot() contour(X, Y, Z, 6, linewidths=4, colors=('r', 'green', 'blue', (1,1,0), '#afeeee', '0.5'), alpha=0.4) show()  On Thursday 31 August 2006 13:50, Eric Firing wrote: > Scott, > > Please send a minimal example that I can use as a test case. This > sounds vaguely familiar. > > Thanks. > > Eric > > Scott Ransom wrote: > > Hi All, > > > > I'm using matplotlib (with agg backends) from recent svn: > > > > In [63]: matplotlib.__version__ > > Out[63]: '0.87.4' > > > > and I can't seem to get contour() or contourf() to utilize the > > alpha keyword. No matter what value I set, alpha=1.0 on the > > output. Alpha in general works fine, as the scatter_demo2.py > > example gives very nicely alphachanneled output. > > > > Any ideas? Thanks a bunch, > > > > Scott  Scott M. Ransom Address: NRAO Phone: (434) 2960320 520 Edgemont Rd. email: sransom@... Charlottesville, VA 22903 USA GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 
From: Eric Firing <efiring@ha...>  20060901 00:15:41

Scott, This is fixed now in svn. (I will probably go back shortly and make another change to improve efficiency.) There was a oneline bug in contour.py, but the fundamental problem was that colors.ColorConverter (which handles color inputs for collections, among other things) was stripping off the alpha value and replacing it with 1.0. Thanks for highlighting the bug. Eric Scott Ransom wrote: > Hi Eric, > > This shows what I'm talking about: > >  > from pylab import * > > delta = 0.025 > x = arange(3.0, 3.0, delta) > y = arange(2.0, 2.0, delta) > X, Y = meshgrid(x, y) > Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) > Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) > # difference of Gaussians > Z = 10.0 * (Z2  Z1) > > contourf(X, Y, sin(Y)*cos(X), > alpha=0.2) > hot() > contour(X, Y, Z, 6, > linewidths=4, > colors=('r', 'green', 'blue', (1,1,0), '#afeeee', '0.5'), > alpha=0.4) > show() > >  > > On Thursday 31 August 2006 13:50, Eric Firing wrote: >> Scott, >> >> Please send a minimal example that I can use as a test case. This >> sounds vaguely familiar. >> >> Thanks. >> >> Eric >> >> Scott Ransom wrote: >>> Hi All, >>> >>> I'm using matplotlib (with agg backends) from recent svn: >>> >>> In [63]: matplotlib.__version__ >>> Out[63]: '0.87.4' >>> >>> and I can't seem to get contour() or contourf() to utilize the >>> alpha keyword. No matter what value I set, alpha=1.0 on the >>> output. Alpha in general works fine, as the scatter_demo2.py >>> example gives very nicely alphachanneled output. >>> >>> Any ideas? Thanks a bunch, >>> >>> Scott > 
From: George Nurser <gnurser@go...>  20060903 07:04:03

On 01/09/06, Eric Firing <efiring@...> wrote: > Scott, > > This is fixed now in svn. (I will probably go back shortly and make > another change to improve efficiency.) There was a oneline bug in > contour.py, but the fundamental problem was that colors.ColorConverter > (which handles color inputs for collections, among other things) was > stripping off the alpha value and replacing it with 1.0. Eric, Now that this bug is sorted, will it enable pcolormesh to use alpha = 0 to not plot missing data? George. 
From: Eric Firing <efiring@ha...>  20060903 07:17:52

George Nurser wrote: > On 01/09/06, Eric Firing <efiring@...> wrote: >> Scott, >> >> This is fixed now in svn. (I will probably go back shortly and make >> another change to improve efficiency.) There was a oneline bug in >> contour.py, but the fundamental problem was that colors.ColorConverter >> (which handles color inputs for collections, among other things) was >> stripping off the alpha value and replacing it with 1.0. > > Eric, > Now that this bug is sorted, will it enable pcolormesh to use alpha = > 0 to not plot missing data? George, Unfortunately notit is a completely different bug. A while ago I tracked the pcolormesh alpha bug down into the bowels of the quadmesh code, where it is making fairly lowlevel Agg calls. I didn't write quadmesh, I have never dealt with Agg directly, and I don't think I can afford the time that it would take for me to understand itassuming I could. So, I've been unable to fix the pcolormesh alpha bug. I think it will require an Agg wizard, preferably one of the original quadmesh authors. Eric 