反转热图颜色栏的颜色

时间:2020-01-16 01:26:32

标签: seaborn heatmap

是否有一种方法可以反转cmap参数的热图颜色栏?

例如

sns.heatmap([List], cmap='RdBu') # I dont have an input yet so just wanted to try

输出示例:

5 higher-higher-higher-red-ish
4 higher-higher-higher-red-ish
3 higher-higher-red-ish
2 higher-red-ish
1 red-ish
0 white-ish
-1 blue-ish
-2 higher-blue-ish
-3 higher-higher-blue-ish
-4 higher-higher-blue-ish
-5 higher-higher-blue-ish

预期的输出示例:

5 higher-higher-higher-blue-ish
4 higher-higher-higher-blue-ish
3 higher-higher-blue-ish
2 higher-blue-ish
1 blue-ish
0 white-ish
-1 red-ish
-2 higher-red-ish
-3 higher-higher-red-ish
-4 higher-higher-red-ish
-5 higher-higher-red-ish

对不起,我没有更好的例子。

0 个答案:

没有答案