【问题标题】:create pirate plot in seaborn (combination of box and point plot)在 seaborn 中创建海盗图(箱线图和点图的组合)
【发布时间】:2017-07-28 05:38:56
【问题描述】:

R 中有一个很好的情节,叫做海盗情节。它是箱线图和点图的组合。如何用 seaborn 在 python 中绘制类似的东西? 你可以在这里找到一个例子:http://rpubs.com/yarrr/pirateplot

【问题讨论】:

标签: python matplotlib plot seaborn


【解决方案1】:

这是我能想到的最接近海盗情节的。同时使用 seaborn boxplot 和 stripplot。

sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.boxplot(x="day", y="total_bill", data=tips)
ax = sns.stripplot(x="day", y="total_bill", data=tips, color=".25")

生成此图表。

【讨论】:

    猜你喜欢
    • 2020-08-03
    • 2021-02-03
    • 2016-06-11
    • 2019-04-29
    • 2016-06-12
    • 2017-05-14
    • 2021-03-08
    • 2018-02-16
    • 1970-01-01
    相关资源
    最近更新 更多