Box around text

I want to make a semi-transparent box around the text

    > labels along the radial axis of a polar plot. Is there a
    > method that returns the coordinates of a box that encloses
    > the text?

    > I see that a text instance has a method called
    > get_window_extent. What does it return? What would I use
    > for the parameter 'renderer'? Are there any examples
    > showing how to use this?

The problem here is that there is no way to know the text size
(bounding box) until the renderer (backend) is known. matplotlib
enforces a rigid separation between the "artists" (lines, texts,
things that go into a figure) and the things that draw them (renderer
/ backend) . In most cases this presents no difficulties, but in the
case of text it does, since layout information is not available until
the figure is drawn, since that is when the backend/renderer is drawn.
So that is what the renderer is and the short answer is that it is not
available at the matlab interface level.

But I've been wanting to support the ability to put bounding boxes
around text instances and your post triggered the idea on how to do
this. I added a new text property "bbox" which takes as a dictionary
of Rectangle properties

    t = title('hi mom', bbox={'edgecolor':'k', 'facecolor':'r', 'alpha':0.5})

In addition to the rectangle properties, the bbox dict accepts an
additional property 'pad' which gives the padding around the text in

I checked the changes into CVS - it usually takes the mirrors a few
hours to update.

If you get a snazzy screenshot of your polar plot after all these
customizations that would look nice on the web site, please send it my