I have an array of 500000 samples i.e., the data's shape is (500000, 3) where the first two columns represent x-coordinate and y- coordinate, and the third column is Label values to which the datapoint @ (X,Y) belongs.
for example:- data= [ [20,10, 12.3320], [22, 13, 230.221],.....[..] ]
I tried the below method. But this is too time consuming and poorly interpreted.
import matplotlib.pyplot as plt colors = 10*['r.','g.','b.','c.','k.','y.','m.'] for i in range(len(labels)): plt.scatter(data[i][0], data[i][1], colors[labels[i]],marker='.') plt.show() Is there any other method like imshow() or other which is suitable for the above code which leads to good interpretation?
imshowthe data must be equally spaced on a grid. Is this the case? Can you tell us more how your data is structured in the columns?