I have a matrix looking like:
50 3 1
100 3 1
150 3 0
...
100 15 0
150 15 0
Now I want to use a scatter plot to plot it. Where:
Matrix[:][0] = X-Values # For demonstration used the ':' operator from Matlab which means it includes all values.
Matrix[:][1] = Y-Values
Matrix[:][2] = color where 0 = blue & 1 = yellow
For example. The first point would be:
Matrix[0][0] = 50 as X-Value of first point
Matrix[0][1] = 3 as Y-Value of first point
Matrix[0][2] = 1 as color (yellow) of first point
I already tried the following
plt.scatter(Matrix[0], Matrix[1]) # didn't worked. Had only like 4 scatter points instead of over 100
plt.scatter(Matrix[:][0], Matrix[:][1]) # Same issue
for i in range(len(Matrix)):
plt.scatter(Matrix[i][0], Matrix[i][1], c=Matrix[i][2]) # worked, but is pretty slow and all points were black instead of colored
My Matrix is created by:
w, h = len(list_of_dfs), 3)
Matrix = [[0 for x in range(h)] for y in range(w)]
# And then filled like
Matrix[0][0] = 50 ...
Any suggestions?