【问题标题】:How to adjust the size of dots in regplot seaborn如何在regplot seaborn中调整点的大小
【发布时间】:2018-01-26 08:34:38
【问题描述】:

我在 seaborn 中使用函数 regplot 来绘制图形。有没有办法调整点的大小?我没想到我能找到它。 link

【问题讨论】:

    标签: python matplotlib seaborn


    【解决方案1】:

    使用scatter_kws= 参数。您可以传递要传递给plt.scatter的选项字典

    import seaborn as sns
    tips = sns.load_dataset("tips")
    ax = sns.regplot(x="total_bill", y="tip", data=tips, scatter_kws={'s':100, 'facecolor':'red'})
    

    【讨论】:

    • 比你好多了。这就是我要找的!
    猜你喜欢
    • 2016-08-23
    • 2021-07-22
    • 2017-05-30
    • 1970-01-01
    • 2020-06-18
    • 2019-09-14
    • 2021-10-02
    • 2018-06-17
    • 1970-01-01
    相关资源
    最近更新 更多