getting colors from the discrete color bar

Hello everyone!

I want to extract colors from the colormap

     import as cm

Now I need to get colors from the discrete colorbar
there is a working code how to create discrete colormap: Discrete

I make same thing with:
    newcbar=cmap_discretize(cm.jet,100) # jet is devided by 100 parts

surprisingly color2 is different than color1. I dont understand why.

Could you please give me an idea how to create a discrete colorbar and
extract color?


View this message in context:
Sent from the matplotlib - users mailing list archive at