Skip to content

Commit 6e1c90c

Browse files
ArturoAmorQArturoAmorQ
and
ArturoAmorQ
authored
Add label to colorbar in sns.heatmap (#815)
Co-authored-by: ArturoAmorQ <[email protected]>
1 parent 8737eca commit 6e1c90c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python_scripts/parameter_tuning_grid_search.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ def shorten_param(param_name):
240240
import seaborn as sns
241241

242242
ax = sns.heatmap(
243-
pivoted_cv_results, annot=True, cmap="YlGnBu", vmin=0.7, vmax=0.9
243+
pivoted_cv_results,
244+
annot=True,
245+
cmap="YlGnBu",
246+
vmin=0.7,
247+
vmax=0.9,
248+
cbar_kws={"label": "mean test accuracy"},
244249
)
245250
ax.invert_yaxis()
246251

0 commit comments

Comments
 (0)