def METHOD_NAME(filter, bins):
    import matplotlib.pyplot as plt
    x = (bins[:-1] + bins[1:])/2.
    a1 = plt.axes()
    bn, bm, bs = binAvg(filter['fitResults_z0'], filter['fitError_x0'], bins)
    a1.plot(x, bm, lw=2, c='b', label='x')
    a1.fill_between(x, np.maximum(bm-bs, 0), bm + bs, facecolor='b', alpha=0.2)
    bn, bm, bs = binAvg(filter['fitResults_z0'], filter['fitError_y0'], bins)
    a1.plot(x, bm, lw=2, c='g', label='y')
    a1.fill_between(x, np.maximum(bm-bs, 0), bm + bs, facecolor='g', alpha=0.2)
    bn, bm, bs = binAvg(filter['fitResults_z0'], filter['fitError_z0'], bins)
    a1.plot(x, bm, lw=2, c='r', label='z')
    a1.fill_between(x, np.maximum(bm-bs, 0), bm + bs, facecolor='r', alpha=0.2)
    plt.ylabel('Fit Error [nm]')
    plt.xlabel('Defocus [nm]')
    plt.legend()
    plt.ylim(0, 120)
    a2 = plt.twinx()
    a2.plot(x, bn, 'k')
    plt.ylabel('Number of fitted events'