SyntaxFix
Write A Post
Hire A Developer
Questions
As of Matplotlib 2.0, there is a reversed() method for ListedColormap and LinearSegmentedColorMap objects, so you can just do
reversed()
ListedColormap
LinearSegmentedColorMap
cmap_reversed = cmap.reversed()
Here is the documentation.