It's possible to set the color cycle to match an existing colormap, but this question is asking how to do the inverse: creating a qualitative colormap from the color cycle.
In my specific case, I've got a scatter plot with an associated array of integer class labels. My current plot looks like this:
x,y = np.random.normal(size=(2,250))
theta = np.arctan2(y,x)
c = np.digitize(theta, np.histogram(theta)[1])
plt.scatter(x,y,c=c)
As you can see, this doesn't do a great job of distinguishing the classes cleanly. Instead, I'd like to somehow plug in a colormap that matches the current color cycle, where label i corresponds to color_cycle[i]. If I have more classes than the color cycle has colors, that's fine, it should just wrap around like normal.

