I need to color half of an array one color.
Suppose I have 2 arrays that I concatenate
arr1 = [[1,2, 3,4]] arr2 = [[1,2, 3,4]] arr 3 = np.concatenate((arr1, arr2), axis=0) plt.scatter(arr3[:,0], arr3[:,1], c= ???) This is an example, my real data set has 16,000 data points so a separate label array might not be possible. From index 0 - 8000~ I want to be red. 8000 - 16000 I want to be blue. Thanks
plt.plot(X,y,'o',c='red')mid = int(len(arr3[0])/2)and then use something likeplt.scatter(arr3[:,0][0:mid], arr3[:,1][0:mid], c= 'r')andplt.scatter(arr3[:,0][mid:], arr3[:,1][mid:], c= 'b').plt.scatter(x[0:100], y[0:100], 'o', 'red')cargument.