'Draw a horizontal bar with the size in data coordinate of the given
axes. A label will be drawn underneath (center-aligned).
pad, borderpad in fraction of the legend font size (or prop)
sep in points.'

def __init__(self, transform, size, label, loc, pad=0.1, borderpad=0.1, sep=2, prop=None, frameon=True):

    self.size_bar = AuxTransformBox(transform)
    self.size_bar.add_artist(Rectangle((0, 0), size, 0, fc='none', lw=1.0))
    self.txt_label = TextArea(label, minimumdescent=False)
    self._box = VPacker(children=[self.size_bar, self.txt_label], align='center', pad=0, sep=sep)
    AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad, child=self._box, prop=prop, frameon=frameon)
