I am reading Machine Learning in action Chapter Two, I don't know how to label the dots which are separated into three group.
The data has four columns and two columns in the first three are being used as x and y, the last column is the label (1 , 2 and 3).
Dataset is in the same numpy array and is plot with different color and size with .scatter(X, Y, 15 * the value of label, 15 * the value of label)
Here is the code for plotting without legend.
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(datingDataMat[:, 0], datingDataMat[:, 1], 15 * np.array(datingLabels), 15 * np.array(datingLabels))
fig.suptitle('Figure 2 Using X = Colume 0 and Y = Colume 1')
plt.xlabel('Frequent Flyier Miles Earned Per Year')
plt.ylabel('Percentage of Time Spent Playing Video Games')
plt.show()