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
>
