|
From: John H. <jdh...@ac...> - 2007-01-03 21:16:06
|
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
Mark> Hello - I want to set the backgroundcolor of text with the
Mark> set_backgroundcolor function. Does that actually work? I
Mark> saw a more complicated way to do it by defining a bbox, but
Mark> this would be much easier (if I got it to work). Here's my
Mark> example that doesn't work. Thanks for any suggestions,
Strange. When I saw your post my first thought was "hmmm, I didn't
know we had a text background color". I looked through the text.py
code and it is there as a property, but is totally unused. I don't
know who added it, but apparently someone got interrupted mid-code.
That someone could be me, but if anyone knows where this came from
speak up; otherwise it will be removed.
The bbox is the standard way to do this, and is a bit more general
since you can set the alpha, the linewidth, the edgecolor, etc...
ax.text(1,2,'hi mom', bbox=dict(facecolor='red'))
JDH
|