def add_point()

in viz/utils.py [0:0]


def add_point(ax, data, label, ls="-", marker=None, color=None, linewidth=1):
    xs = np.array(sorted([k for k in data]))
    ys = np.array([np.mean(clean(data[x])) for x in xs])
    std = np.array([np.std(clean(data[x])) for x in xs])
    # ax.plot(xs, ys, label=label, linestyle=ls, marker=marker, color=color)
    if label is None:
        ax.errorbar(
            xs,
            ys,
            yerr=(std, std),
            marker=marker,
            markersize=7,
            linewidth=linewidth,
            linestyle=ls,
            capsize=1,
            dashes=(5, 5),
            capthick=0.2,
            color=color,
            alpha=0.75,
        )

    else:
        # if label == 'Line' or label == 'Curve' or label == 'Line (Layerwise)' or label == 'SWA (Cyclic LR)':
        #     ax.errorbar(xs, ys, yerr=(std, std), label=label, marker=marker, markersize=7, dashes = (3,4), linewidth=linewidth, linestyle=ls, capsize=1, capthick=0.2, color=color, alpha=0.75)

        # elif 'Line' in label and 'Ensemble' not in label:
        #     ax.errorbar(xs, ys, yerr=(std, std), label=label, marker=marker, markersize=7, dashes = (4,4), linewidth=linewidth, linestyle=ls, capsize=1, capthick=0.2, color=color, alpha=0.75)

        # else:
        ax.errorbar(
            xs,
            ys,
            yerr=(std, std),
            label=label,
            marker=marker,
            markersize=7,
            linewidth=linewidth,
            linestyle=ls,
            capsize=1,
            capthick=0.2,
            color=color,
            alpha=0.75,
        )

    return xs, ys, std, label