i have the following data and code, where im trying to plot the data with a scatterplot, however i dont know how to seperate the labels of the class in the actual plotting:
X = np.array([[3,4],[1,4],[2,3],[6,-1],[7,-1],[5,-3],[2,4]] )
y = np.array([-1,-1, -1, 1, 1 , 1, 1 ])
[...]
plt.axline((0,b),slope=a, color='r', linestyle='-', label="Decision Boundy")
plt.scatter(X[:,0],X[:,1],c=y)
plt.legend()
plt.show()
resulting in the plot:
Is it possible to have seperate labels for the colors/classes or do i have to plot them seperatly?