Invert (not vice versa) color map in matplotlib?

Are there any good ways to invert (not the opposite, which is trivial, see Invert colormap in matplotlib ) the colormap in matplotlib?

ie, I want to take a png image with shape color tuples (1,1,0,1)

and use colplap for matplotlib to get the number of integers or floats.

I think I can hack something to do this, but I can't be the first to want this functionality - does it exist somewhere I couldn't find, or is it built into matplotlib?

+3


source to share





All Articles