Those artist in offsetbox module (e.g., TextArea, VPacker, AnchoredOffsetbox) are mostly a container object, i.e., actual drawing is done by other artists. And changing the artist attributes of the container object often does not work. In your case (I guess you want to make the frame translucent?), the actual artist responsible for drawing the frame is anchored_box.patch (==art.patch). So
anchored_box.patch.set_alpha(0.5) should work. -JJ On Tue, Aug 17, 2010 at 12:59 AM, Mathew Yeates <mat.yea...@gmail.com> wrote: > Hi > I want my plot to be visible when I display some text over it. Why > doesn't this work? > fig = plt.figure(figsize=(5,5), dpi=100) > ax=fig.add_axes([0.1,0.1,0.8,.8]) > ax.hist(data) > box1 = TextArea("Minimum: %f" % mind, textprops=dict(color="k")) > box2 = TextArea("Maximum: %f" % maxd, textprops=dict(color="k")) > box = VPacker(children=[box1,box2], > align="center", > pad=0, sep=5) > anchored_box = AnchoredOffsetbox(loc=3, > child=box, pad=0., > frameon=True, > bbox_to_anchor=(0.8, 0.72), > bbox_transform=ax.transAxes, > borderpad=0., > ) > > > art=ax.add_artist(anchored_box) > art.set_alpha(0.5) > > -Mathew > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users