On 9/11/07, Jose Gomez-Dans <[EMAIL PROTECTED]> wrote:
> 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

You can turn off the figure frame entirely

  fig = figure(frameon=False)

Or you can leave the frame on, but set the alpha channel

  fig = figure()
  fig.figurePatch.set_alpha(0.1)

Does that help?  Note you may want to set the alpha of the axesPatch as well

  ax.axesPatch.set_alpha(0.5)

you can do the same for legends, where l is a Legend instance

  l.legendPatch.set_alpha(0.5)

JDH

-------------------------------------------------------------------------
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