seabornheatmap

How to remove color bar in seaborn heatmap?


How can I hide the color bar from a seaborn generated heatmap

import numpy as np; np.random.seed(0)
import seaborn as sns; sns.set_theme()
uniform_data = np.random.rand(10, 12)

ax = sns.heatmap(uniform_data)

Solution

  • You can use cbar=False for that:

    ax = sns.heatmap(uniform_data, cbar=False)
    

    I came across the answer in a comment here. More details here.