legend_dict = {(0): 'foo', (1): 'bar', (2): 'baz', (3): 'biff'}
seen = set()
for x, y, label in zip(xs, ys, labels):
    if label not in seen:
        plt.scatter(x, y, c=label_dict.get(label), label=legend_dict.get(label)
            )
else:
    plt.scatter(x, y, c=label_dict.get(label))
seen.add(label)
plt.legend()
plt.show()
Изобразить легенду без повторов