If I'm doing a scatter plot with the points coloured based on magnitude, can I specify the color levels like in contour & contourf?
For example I do this:
from random import randrange
import matplotlib.pyplot as plt
x, t, t = [], [], []
for x in range(10):
y.append(randrange(30,45,1))
x.append(randrange(50,65,1))
t.append(randrange(0,20,1))
fig = plt.figure()
ax = fig.add_subplot()
scats = ax.scatter(x,y,s=30,c=t, marker = 'o', cmap = "hsv")
plt.show()
Which produces a plot something like this:
But is there some way to add a 'levels' type argument in the scatter plot? There I could specify my levels as being [0,4,8,12,16,20] or something?