python matplotlib scatter plot colors error
问题 I am trying to create a scatter plot with x and y grid where every point gets a color by a preassigned value: {x: 1, y: 2, value: n} I have a list of x and y and another list for the values, tried using this: # make range of x(0 - 359) and y(-90 - 90) x, y = np.meshgrid(range(0, 360), range(-90, 90)) colors = [a very long list (64800 values, one for each point)] print(colors) plt.scatter(x, y, c=colors) plt.colorbar() plt.show() Errors: Traceback (most recent call last): File "C:\python3.6.6