Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 seaborn 为不同的职业绘制图表,但我无法识别 x 轴上的标签。这是图表的图像
正如评论中提到的@Karthik,我尝试过旋转标签
ax = sns.countplot(x="Profession", data=df) ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right") plt.tight_layout() plt.show()
这有效