From f0a64ed9ad322bd457f0b313171852d9cdbc2c15 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 7 Jan 2021 13:30:46 +0100 Subject: [PATCH] label rotation --- src/plots/test_score_per_class.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plots/test_score_per_class.py b/src/plots/test_score_per_class.py index 4f19b58..2301674 100644 --- a/src/plots/test_score_per_class.py +++ b/src/plots/test_score_per_class.py @@ -86,9 +86,7 @@ patch.set_facecolor(color) # rotate labels - for tick in ax.get_xticklabels(): - tick.set_rotation(70) - tick.set_ha("right") + plt.setp( ax.xaxis.get_majorticklabels(), rotation=70, ha="right", rotation_mode="anchor") # add legend labels = [LOSS_FUNTION_CONFIG[l]["display_name"] for l in LOSS_FUNTION_ORDER]