【发布时间】:2021-09-25 20:20:11
【问题描述】:
我有一张在 Seaborn 中制作的图表(catplot type=count),我试图通过将 True 和 False 替换为 Yes 和 No 来使它看起来更好看。
这是目前的代码:
g_q1 = sns.catplot(x='Q1', kind='count', order=[True, False], data=clean_df, height=4, aspect=1)
g_q1.set(xlabel='Question will be here', ylabel='Number of Participants')
对数据集包含的问题的回复都是布尔值,但我想用是和否(这将是受访者点击的实际答案)而不是真/假来标记条形。实现这一目标的最佳方法是什么?
现在它看起来像这样: Image of the resulting graph
【问题讨论】:
标签: python matplotlib seaborn