def shift_point_by_markersize(axes, x, y, markersize):
    """
    Shift overlapping points alonmg x axis by half of the markersize.
    This allows to show better plots with errorbars.
    """
    inv = axes.transData.inverted()
    points = [(i,j) for i,j in zip(x,y)]
    pixels = axes.transData.transform(points)
    res = inv.transform(pixels+(markersize/2,0))
    return res[:,0], res[:, 1]