def draw_bbox(bbox, renderer, color=u'k', trans=None):
 (l, b, w, h) = bbox.bounds
 r = Rectangle(xy=(l, b), width=w, height=h, edgecolor=color, fill=False)
 if (trans is not None):
  r.set_transform(trans)
 r.set_clip_on(False)
 r.draw(renderer)

def draw_bbox ( bbox , renderer , color = u'k' , trans = None ) : ( l , b , w , h ) = bbox . bounds r = Rectangle ( xy = ( l , b ) , width = w , height = h , edgecolor = color , fill = False ) if ( trans is not None ) : r . set_transform ( trans ) r . set_clip_on ( False ) r . draw ( renderer )
this is a debug function to draw a rectangle around the bounding box returned by :meth:~matplotlib .