【发布时间】:2019-09-28 05:56:07
【问题描述】:
问题:
在使用set_xticklabels 设置 x 轴标签的旋转时,所有标签都会被打印出来。
代码
winner_freq = pd.DataFrame(player_match.winner.value_counts().reset_index())
winner_freq_plot = sns.barplot(x='index', y='winner', data=winner_freq)
winner_freq_plot.set_xticklabels(winner_freq_plot.get_xticklabels(), rotation=90)
截图
我尝试过的修复
我不知道如何修复它并用谷歌搜索但没有答案,所以我将标签分别放在一个列表中并在 set_xticklabels 中提供,但仍然没有运气。
提前致谢:)
【问题讨论】:
标签: python pandas jupyter-notebook seaborn