def annotate(a):
    '\n    draws annotation into a sns heatmap using plt annotation\n    \n    a : dictonary with activity name and borders\n    '
    min_length = 4
    for k in a.keys():
        if (k == 'length'):
            continue
        borders = a[k]
        for (s, e) in borders:
            s_r = (a['length'] - s)
            e_r = (a['length'] - e)
            plt.annotate('', xy=(4, s_r), xycoords='data', xytext=(4, e_r), textcoords='data', arrowprops=dict(shrink=0.0, headwidth=10.0, headlength=1.0, width=0.25, shrinkA=0.0, shrinkB=0.0))
            if ((s_r - e_r) < min_length):
                continue
            plt.annotate(k, xy=(7, ((s_r - ((s_r - e_r) // 2)) - (min_length // 2))), xycoords='data', xytext=(7, ((s_r - ((s_r - e_r) // 2)) - (min_length // 2))), textcoords='data', size=9)
draws annotation into a sns heatmap using plt annotation

a : dictonary with activity name and borders
def annotate(a):
    '\n    draws annotation into a sns heatmap using plt annotation\n    \n    a : dictonary with activity name and borders\n    '
    min_length = 4
    for k in a.keys():
        if (k == 'length'):
            continue
        borders = a[k]
        for (s, e) in borders:
            s_r = (a['length'] - s)
            e_r = (a['length'] - e)
            plt.annotate(, xy=(4, s_r), xycoords='data', xytext=(4, e_r), textcoords='data', arrowprops=dict(shrink=0.0, headwidth=10.0, headlength=1.0, width=0.25, shrinkA=0.0, shrinkB=0.0))
            if ((s_r - e_r) < min_length):
                continue
            plt.annotate(k, xy=(7, ((s_r - ((s_r - e_r) // 2)) - (min_length // 2))), xycoords='data', xytext=(7, ((s_r - ((s_r - e_r) // 2)) - (min_length // 2))), textcoords='data', size=9)