Eric Firing wrote: > > On Wed, Dec 28, 2011 at 1:11 AM, Jeff Whitaker <jsw...@fastmail.fm> wrote: >> >> On 12/27/11 12:07 PM, Logi Ragnarsson wrote: >> >>> Is it supposed to be possible to do a filled contour plot with alpha levels >>> in the colour map? I'm plotting weather data on top of maps and would very >>> much like to plot low levels of wind and precipitation as mostly >>> transparent, with higher levels more opaque. >>> >> Logi: It looks like alpha transparency is controlled with the alpha >> keyword, so you can't specify different alphas for each contour level. You >> may have to call contourf multiple times, changing the alpha as needed for >> each set of contour levels. >> >> -Jeff > > It looks like this is something I can fix by modifying ListedColormap. It is > discarding the alpha values, and I don't think there is any reason it needs > to do so. > > Eric
I feel that this would be a worth-while improvement to the library. In the mean-time, I have realized that the source is all there for me to read, and I can probably create my own patched version of ListedColormap. Actually, I've been interpolating colours to feed to contourf, but it would be much more sensible to use a LinearSegmentedColormap for this. Unfortunately it also discards alpha levels. Regards, Logi PS I was getting digests of the list, so I couldn't properly respond to Eric's mail, in case the headers look funny. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users