On 02/11/2012 07:40 AM, Alexa Villaume wrote:
> Hi All,
>
> I'm just getting started with matplotlib. I'm trying to make a contour
> plot using contourf and have the different paths colored and semi
> transparent but the alpha keyword doesn't seem to do anything. I googled
> around and found that other people have had this same problem but I
> didn't find a solution. Here's what I'm doing -
>
> contourf(metals, U, o3, levels=[o3col-nsig*o3sig, o3col+nsig*o3sig],
> alpha=0.20, colors='magenta')
>
> contourf(metals, U, o2, levels=[o2col-nsig*o2sig, o2col+nsig*o2sig],
> alpha=0.20, colors='blue')
>
> contourf(metals, U, c3, levels=[c3col-nsig*c3sig, c3col+nsig*c3sig],
> alpha=0.20, colors='green')
>
>
> To plot them all together.
>
> For reference my machine is running Mac OS X 10.6.8 and my version of
> matplotlib is 1.2.x
>
> Thanks!

Please provide a minimal but complete script that illustrates the 
problem; describe what it is in the output that does not match your 
expectations.  e.g.,

import numpy as np
import matplotlib.pyplot as plt
z = np.arange(20).reshape(4,5)
plt.contourf(z, levels=[2,3], alpha=0.2, colors='magenta')
plt.savefig("testcontourf_alpha.png")

which produces a pale magenta stripe, as expected, with mpl from github 
master.

Eric

>
>
>
> ------------------------------------------------------------------------------
> Virtualization&  Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to