How to invert color of seaborn heatmap colorbar

前端 未结 4 1294
闹比i
闹比i 2021-01-30 23:10

I use an heatmap to visualize a confusion matrix. I like the standard colors, but I would like to have 0s in light orange and highest values in dark purple.

I managed to

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 23:20

    Did you try to invert the colormap?

    sns.cubehelix_palette(as_cmap=True, reverse=True)
    

提交回复
热议问题