Explicitly setting colorbar bins in plt.scatter

Viewed 1639

I have created a scatter plot over a basemap of the U.S. using pyplot.scatter in which the bins of the color bar are evenly spaced over the range of the input data. However, I would like to explicitly control the bins of the color bar in order to create uneven bins, e.g. [-20, -10, -5,-4,-3,-2,-1,0,1,2,3,4,5,50] instead of evenly spaced bins between -20 and 50. How can this be done?

1 Answers
Related