The default cmap is sns.cm.rocket. To reverse it set cmap to sns.cm.rocket_r

Using your code:

cmap = sns.cm.rocket_r

ax = sns.heatmap(cm_prob,
                 annot=False,
                 fmt=".3f",
                 xticklabels=print_categories,
                 yticklabels=print_categories,
                 vmin=-0.05,
                 cmap = cmap)
Answer from Ben on Stack Overflow
🌐
Seaborn
seaborn.pydata.org › tutorial › color_palettes.html
Choosing color palettes — seaborn 0.13.2 documentation
As with the convention in matplotlib, every continuous colormap has a reversed version, which has the suffix "_r": sns.color_palette("rocket_r", as_cmap=True) One thing to be aware of is that seaborn can generate discrete values from sequential colormaps and, when doing so, it will not use the most extreme values.
Discussions

python - How to reverse colorscales in seaborn heatmap - Stack Overflow
For diverging values seaborn by default seems to show big numbers in warm tone (orange) and small numbers in cold tone (blue). If I need to switch color to opposite, to show big numbers in blue and More on stackoverflow.com
🌐 stackoverflow.com
June 15, 2020
How do I reverse the direction of the color shading in seaborn barplot ?
I get dark to light using "Blues_d" but you can reverse it like this: palette = sns.color_palette("Blues_d",n_colors=15) palette.reverse() opening = sns.barplot(x=most_frequently_opening.index, y=most_frequently_opening.values, palette=palette) Note: n_colors= is the number of colors before repeating. More on reddit.com
🌐 r/learnpython
1
2
March 2, 2021
python - How does cmap work in seaborn and how to change binning? - Stack Overflow
The inspiration for this question comes from breaks in pheatmap in R. The question is if I can define how "rough", how continuous/discrete my colouring and binning is in seaborn's heatmap. I have f... More on stackoverflow.com
🌐 stackoverflow.com
python 3.x - create custom cmap for seaborn heatmap - Stack Overflow
this is a great heatmap: http://graphics.wsj.com/infectious-diseases-and-vaccines/ I'm trying to do something similar in Seaborn, and wondered if I could take a custom color palette like turn it in... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › mwaskom › seaborn › discussions › 3621
Inverse color palette · mwaskom/seaborn · Discussion #3621
sample = df.sample(frac=0.1, random_state=199) plt.figure(figsize=(8, 8)) bright_cmap = sns.color_palette("Spectral", as_cmap=True) heatmap = sns.heatmap(sample[['Offensive duels per 90', 'Deep completions per 90', 'Shots per 90', 'Shots on target, %', 'Minutes played', 'Successful attacking actions per 90', 'xG per 90', 'Penalty conversion, %', ]].corr(), annot=True, cmap=bright_cmap, fmt=".2f") plt.show()
🌐
Noga H. Rotman
r02b.github.io › seaborn_palettes
Seaborn Color Palettes and How to Use Them | Noga H. Rotman
November 8, 2022 - For all of these, there are reversed (add _r to the original name) and dark (_d) variations as well. Note where the colors repeat due to the palette containing less than ten colors.
🌐
Seaborn
seaborn.pydata.org › generated › seaborn.cubehelix_palette.html
seaborn.cubehelix_palette — seaborn 0.13.2 documentation
seaborn.cubehelix_palette(n_colors=6, start=0, rot=0.4, gamma=1.0, hue=0.8, light=0.85, dark=0.15, reverse=False, as_cmap=False)# Make a sequential palette from the cubehelix system. This produces a colormap with linearly-decreasing (or increasing) brightness.
🌐
Seaborn
seaborn.pydata.org › generated › seaborn.light_palette.html
seaborn.light_palette — seaborn 0.13.2 documentation
seaborn.light_palette(color, n_colors=6, reverse=False, as_cmap=False, input='rgb')# Make a sequential palette that blends from light to color. The color parameter can be specified in a number of ways, including all options for defining a color in matplotlib and several additional color spaces that are handled by seaborn.
🌐
Python Graph Gallery
python-graph-gallery.com › the python graph gallery › heatmap › control color in seaborn heatmaps
Control color in seaborn heatmaps
2 weeks ago - # library import seaborn as sns import matplotlib.pyplot as plt import pandas as pd import numpy as np # Create a dataset df = pd.DataFrame( np.random.random((5, 5)), columns=["a", "b", "c", "d", "e"] ) Edit code✨Still copy-pasting code? Let AI write it for you · You can customize the colors in your heatmap with the cmap parameter of the heatmap() function in seaborn.
Find elsewhere
🌐
Seaborn
seaborn.pydata.org › generated › seaborn.color_palette.html
seaborn.color_palette — seaborn 0.13.2 documentation
Ignored when as_cmap is True. ... Proportion to desaturate each color by. ... If True, return a matplotlib.colors.ListedColormap. ... Set the default color cycle for all plots. ... Reassign color codes like "b", "g", etc. to colors from one of the seaborn palettes.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-reverse-a-colormap-using-matplotlib-in-python
How to reverse a Colormap using Matplotlib in Python? - GeeksforGeeks
December 14, 2021 - Then we have to reverse the original colormap for that we use reversed() function for reversing the colormap we will write orig_map.reversed(), from this we will get reversed colormap let it be stored in a variable named as "reversed".
🌐
GitHub
github.com › mwaskom › seaborn › blob › master › seaborn › palettes.py
seaborn/seaborn/palettes.py at master · mwaskom/seaborn
if reverse: x_256 = x_256[::-1] pal_256 = cmap(x_256) cmap = mpl.colors.ListedColormap(pal_256, "seaborn_cubehelix") return cmap · else: return _ColorPalette(pal) · · def _parse_cubehelix_args(argstr): """Turn stringified cubehelix params into args/kwargs.""" ·
🌐
Readthedocs
cmap-docs.readthedocs.io › en › latest › catalog › diverging › seaborn:icefire
seaborn:icefire - cmap
from cmap import Colormap cm = Colormap('seaborn:icefire') # case insensitive · seaborn:icefire · seaborn:icefire ·
🌐
Seaborn
seaborn.pydata.org › generated › seaborn.diverging_palette.html
seaborn.diverging_palette — seaborn 0.13.2 documentation
seaborn.diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, center='light', as_cmap=False)# Make a diverging palette between two HUSL colors. If you are using the IPython notebook, you can also choose this palette interactively with the choose_diverging_palette() function.
🌐
Seaborn
seaborn.pydata.org › generated › seaborn.heatmap.html
seaborn.heatmap — seaborn 0.13.2 documentation - PyData |
The value at which to center the colormap when plotting divergent data. Using this parameter will change the default cmap if none is specified.