@classmethod
    def get_text_width_height(cls, fig, txt="chr01", size=12, usetex=True):
        tp = mpl.textpath.TextPath((0,0), txt, size=size, usetex=usetex)
        bb = tp.get_extents()
        xmin, ymin = fig.transFigure.inverted().transform((bb.xmin, bb.ymin))
        xmax, ymax = fig.transFigure.inverted().transform((bb.xmax, bb.ymax))
        return xmax - xmin, ymax - ymin
dataset/ETHPy150Open tanghaibao/jcvi/graphics/base.py/TextHandler.get_text_width_height/original