【发布时间】:2022-01-01 02:45:06
【问题描述】:
我想用以下数据在 seaborn 中制作一个分组条形图。我该怎么做呢? seaborn 文档有一个“hue”参数,但是如何将它用于我想要显示的多个列?
Type Single Double Many
McDonalds 1 2 10
BK 4 8 7
Popeyes 11 4 11
这是我使用 matplotlib 完成此操作的一个示例……但想在 seaborn 中执行此操作
df.plot.bar(figsize = (20,10), xlabel = 'Type', ylabel = 'Counts', title = 'Type Counts', rot = 0)
【问题讨论】: