'Draw a bounding box around self.  rectprops are any settable
properties for a FancyBboxPatch, e.g., facecolor=\'red\', alpha=0.5.
t.set_bbox(dict(facecolor=\'red\', alpha=0.5))
The default boxstyle is \'square\'. The mutation
scale of the FancyBboxPatch is set to the fontsize.
ACCEPTS: FancyBboxPatch prop dict'

def set_bbox(self, rectprops):

    if (rectprops is not None):
        props = rectprops.copy()
        boxstyle = props.pop(u'boxstyle', None)
        pad = props.pop(u'pad', None)
        if (boxstyle is None):
            boxstyle = u'square'
            if (pad is None):
                pad = 4
            pad /= self.get_size()
        elif (pad is None):
            pad = 0.3
        if (isinstance(boxstyle, six.string_types) and (u'pad' not in boxstyle)):
            boxstyle += (u',pad=%0.2f' % pad)
        bbox_transmuter = props.pop(u'bbox_transmuter', None)
        self._bbox_patch = FancyBboxPatch((0.0, 0.0), 1.0, 1.0, boxstyle=boxstyle, bbox_transmuter=bbox_transmuter, transform=mtransforms.IdentityTransform(), **props)
    else:
        self._bbox_patch = None
    self._update_clip_properties()
