How to annotate text on horizontal Seaborn barplot?
问题 I have the problem that as soon as I want to annotate my horizontal bars there will be some error message: posx and posy should be finite values Than I looked into the code and surprisingly I got some nan values which only appear when the hue parameter is used. Code: ax = sns.barplot(x="Points", y="Characters", hue="Average Speeds", data=albion_dataset, palette="Set1", dodge=False) for p in ax.patches: width = p.get_width() print(width) Output: nan nan 2.57562 nan nan nan nan 1.526325 nan ...