I'm generating images that I want to use as overlays in Google Earth. Thus, I would like the masked portion of the numpy arrays I am using to appear as transparent. However, I seem to consistently get white instead of a transparent point.
To clarify the issue, I wrote this short piece of code. I am setting both the figure background to transaprent and the masked value to transparent but I get white. I have pulled the current svn code and built matplotlib. I get the same issue. from numpy import ma import matplotlib.pyplot as plt from pylab import colorbar, imshow, show, cm def main(): a = ma.array([[1,2,3],[4,5,6]],mask=[[0,0,1],[0,0,0]]) fig = plt.figure() fig.patch.set_alpha(0.0) cmap = cm.jet cmap.set_bad(alpha=0.0) imshow(a, interpolation='nearest', cmap=cmap) colorbar() show() Any thoughts? Tim B ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users