I have the following code to create a heatmap with seaborn! unfourtunately my y-ticklabels are long names, and are cut off from the figure as shown in the attached image!
seasons = ['yearly','djf','mam','jja','son']
for season_index,season in enumerate(['yearly','djf','mam','jja','son']):
im = sns.heatmap(bias[:,season_index,:],linewidth = 0.5,cmap='coolwarm', annot=True,annot_kws={'fontsize':7, 'fontweight':'bold'})
im.set_xticklabels(['1','2','3','4','5','6','7','8','9'])
im.set_yticklabels(model_list)
plt.savefig(f"figures/bias/yearly_bias_{seasons[season_index]}.png")
plt.close()
I tried changing the figure size with matplotlib, but everytime i did that, the tick labels would rotate 90° and overlap, and in my code it didn't work to reset it with the rotation keyword in the set_yticklabels function.
i also tried this but that had the same result in turning the labels.
Thank you!