簡體   English   中英

使 swarmplot 點更大

[英]Making swarmplot points bigger

我想讓我的 swarmplot 上的數據點更大。 我的代碼是:

sns.swarmplot(x="Heart", y="FirstPersonPronouns", hue="Speech", data=df)
sns.set_context("notebook", font_scale=1.8)

我試過scatter_kws但得到:

Attribute error: unknown property scatter_kws.

從 swarmplot 文檔字符串:

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]

進而:

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``.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM