y = np.random.random(3)
z = np.arange(3)
colors = ['red', 'yellow', 'blue']
c = ['ro', 'yo', 'bo']
for i in z:
    plt.plot(x[i], y[i], c[i], label=colors[i] + ' ' + str(i))
plt.legend()
Label data when doing a scatter plot in python