Python scatter plot 2 dimensional array
Try using a meshgrid
to define your point locations, and don't forget to index into your NumPy array properly (with [x,y]
rather than [x][y]
):
x, y = numpy.meshgrid(x,y)plt.scatter(x,y,c=test_data[x,y])plt.show()