def _get_text(txt, x, y, dx, dy, ha='center', va='center', **kwargs):
    if ('color' in kwargs):
        textcolor = kwargs['color']
        del kwargs['color']
    elif ('markeredgecolor' in kwargs):
        textcolor = kwargs['markeredgecolor']
    else:
        import matplotlib as mpl
        textcolor = mpl.rcParams['text.color']
    ann = Annotation(txt, (x, y), xytext=(dx, dy), xycoords='data', textcoords='offset points', color=textcolor, ha=ha, va=va, **kwargs)
    ann.set_transform(IdentityTransform())
    return ann
def _get_text(txt, x, y, dx, dy, ha='center', va='center', **kwargs):
    if ('color' in kwargs):
        textcolor = kwargs['color']
        del kwargs['color']
    elif ('markeredgecolor' in kwargs):
        textcolor = kwargs['markeredgecolor']
    else:
        import matplotlib as mpl
        textcolor = mpl.rcParams['text.color']
    ann = Annotation(txt, (x, y), xytext=(dx, dy), xycoords='data', textcoords='offset points', color=textcolor, ha=ha, va=va, **kwargs)
    ann.set_transform(IdentityTransform())
    return ann