I have a data frame with 2 dimensions. i.e.
data = [[ 7.08535569 5.20423916]
[ -6.12292297 -9.79831639]
[ -0.14405156 0.02112219]
...
[ -2.93838878 2.4744518 ]
[ 8.07134259 -10.8165695 ]
[ 5.14161567 2.68737039]]
I also have a target value for each index i.e.
target = [-1, 1, 1, -1 ... -1, 1, -1, -1]
What is the easiest way to use PyPlot to color code the points based on their target value?
Currently I have
X = data[:,0]
y = data[:,1]
plt.plot(X, y, 'ro')
plt.show()