Hi Patrick,

Thanks for your message!

On 9/10/07, Patrick Bradley <[EMAIL PROTECTED]> wrote:
> lg = legend()
> lg.get_frame().set_fill(False)

Mmmm, this is OK, let's say I wanted a figure with a transparent
background. I can't find a set_fill() method for this class. I have
tried the facecolor attribute, but no luck. I think I got this right.
I am using the Agg backend (does this make a difference?). The files
are RGBA pngs, but the alpha channel is always 255, so my background
is always white, as opposed to transparent.

Am I doing something wrong? I am using matplotlib 0.90.0. Here's some
sample code

import pylab
FaceColor=(1.0, 1.0, 1.0, 0.0 )
fig = pylab.figure(figsize=(6,1.5))
ax = fig.add_axes([0.05, 0.4, 0.9, 0.5])
cmap = mpl.cm.jet
norm = mpl.colors.Normalize(vmin=0, vmax=1)
cb = mpl.colorbar.ColorbarBase(ax, cmap=cmap, \
                                                        
norm=norm,orientation='horizontal' )
cb.set_alpha(0.0)
fig.set_facecolor(FaceColor)
pylab.savefig( "fichero.png", dpi=72, facecolor=FaceColor)

cheers!
José

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to