Answers for "seaborn heatmap colors"

1

seaborn heatmap parameters

# seaborn heatmap best parameter
plt.figure(figsize=(20,8))
sns.heatmap(corr, vmax=1, vmin=-1, center=0,
			linewidth=.5,square=True, annot = True,
            annot_kws = {'size':8},fmt='.1f', cmap='BrBG_r', ax=ax1,  # ax: use this when using subplot
            cbar_kws = dict(use_gridspec=False,location="top", shrink=0.9)) # cbar_kws: for positioning cbar and "shrink" for reducing cbar size
plt.title('Correlation')
plt.show()
Posted by: Guest on August-23-2021
0

python seaborn color map

sns.color_palette("hls", 8)
Posted by: Guest on November-30-2020

Python Answers by Framework

Browse Popular Code Answers by Language