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)
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)
You can use cbar=False for that
ax = sns.heatmap(uniform_data, cbar=False)
I am answering my own question because I only came across the answer in a comment here Matplotlib - How to remove color bar but keep the heatmap position unchanged
More details here https://seaborn.pydata.org/generated/seaborn.heatmap.html