首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使swarmplot点更大

使swarmplot点更大
EN

Stack Overflow用户
提问于 2016-09-15 05:00:37
回答 1查看 2.6K关注 0票数 2

我想让我的swarmplot上的数据点更大。我的代码是:

代码语言:javascript
复制
sns.swarmplot(x="Heart", y="FirstPersonPronouns", hue="Speech", data=df)
sns.set_context("notebook", font_scale=1.8)

我已经尝试过scatter_kws,但是得到了:

代码语言:javascript
复制
Attribute error: unknown property scatter_kws.
EN

回答 1

Stack Overflow用户

发布于 2016-09-15 06:44:46

从swarmplot文档字符串:

代码语言:javascript
复制
Signature: seaborn.swarmplot(x=None, y=None, hue=None, data=None,
order=None, hue_order=None, split=False, orient=None, color=None, 
palette=None, size=5, edgecolor='gray', linewidth=0, ax=None,
**kwargs)
Docstring: Draw a categorical scatterplot with non-overlapping points.     
[snip]


Parameters
---------- 
x, y, hue : names of variables in ``data`` or vector data, optional
    Inputs for plotting long-form data. See examples for interpretation. 
data : DataFrame, array, or list of arrays, optional
    Dataset for plotting. If ``x`` and ``y`` are absent, this is
    interpreted as wide-form. Otherwise it is expected to be long-form. [snip]

然后:

代码语言:javascript
复制
size : float, optional
    Diameter of the markers, in points. (Although ``plt.scatter`` is used
    to draw the points, the ``size`` argument here takes a "normal"
    markersize and not size^2 like ``plt.scatter``.
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39499576

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档