x
, y
and c
must all be the same size as they are mapped by position (zip(x, y, c)
should return the position and color tuples you want).
Try something like
X, Y = np.meshgrid(x, y) # makes 2D X, Y arrays for every grid point
sc = plt.scatter(X.ravel(), Y.ravel(), c=c.ravel(), ...)