plotnine.stat_sina
stat_sina(mapping=None, data=None, **kwargs)Compute Sina plot values
{usage}
Parameters
binwidth : float = None-
The width of the bins. The default is to use bins that cover the range of the data. You should always override this value, exploring multiple widths to find the best to illustrate the stories in your data.
bins : int = 50-
Number of bins. Overridden by binwidth.
method : Literal[density, counts] = "density"-
Choose the method to spread the samples within the same bin along the x-axis. Available methods: “density”, “counts” (can be abbreviated, e.g. “d”). See Details.
maxwidth : float = None-
Control the maximum width the points can spread into. Values should be in the range (0, 1).
adjust : float = 1-
Adjusts the bandwidth of the density kernel when
method="density". seestat_density. bw : str | float = "nrd0"-
The bandwidth to use, If a float is given, it is the bandwidth. The
strchoices are:"nrd0", "normal_reference", "scott", "silverman"nrd0is a port ofstats::bw.nrd0in R; it is eqiuvalent tosilvermanwhen there is more than 1 value in a group. bin_limit : int = 1-
If the samples within the same y-axis bin are more than
bin_limit, the samples’s X coordinates will be adjusted. This parameter is effective only whenmethod="counts" random_state : int | RandomState = None-
Seed or Random number generator to use. If
None, then numpy global generatornumpy.randomis used. scale : Literal[area, count, width] = "area"-
How to scale the sina groups.
area- Scale by the largest density/bin among the different sinascount- areas are scaled proportionally to the number of pointswidth- Only scale according to the maxwidth parameter.
style-
Type of sina plot to draw. The options are
'full' # Regular (2 sided) 'left' # Left-sided half 'right' # Right-sided half 'left-right' # Alternate (left first) half by the group 'right-left' # Alternate (right first) half by the group
See Also
geom_sina-
The default
geomfor thisstat.