Skip to content Skip to sidebar Skip to footer

Value Error With Color Array When Slicing Values For Scatter Plot

I want to specify the frequency of markers that are printed in my scatter plot. After being unsuccessful with markevery (other stackoverflow question: Problems with using markevery

Solution 1:

Your colour list should be the same length as your data. So you need to apply the same slice.

timePlot = ax.scatter(x[::5], y[::5], s=50, c=timeList[::5], 
                      marker = marker.next(), edgecolors='none', 
                      norm=cNorm, cmap = plt.matplotlib.cm.jet)

Post a Comment for "Value Error With Color Array When Slicing Values For Scatter Plot"