Skip to content

geom_sina

geom_sina(
    mapping: FeatureSpec | None = None,
    *,
    data: PlotData | None = None,
    stat: str | None = None,
    position: Position | None = None,
    show_legend: bool | None = None,
    inherit_aes: bool | None = None,
    manual_key: ManualKey | None = None,
    sampling: Sampling | None = None,
    tooltips: Tooltips | None = None,
    orientation: str | None = None,
    seed: int | None = None,
    show_half: Number | None = None,
    quantiles: Sequence[float] | None = None,
    scale: Number | None = None,
    trim: bool | None = None,
    tails_cutoff: Number | None = None,
    kernel: str | None = None,
    bw: str | Number | None = None,
    adjust: Number | None = None,
    n: int | None = None,
    fs_max: Number | None = None,
    color_by: str | None = None,
    fill_by: str | None = None,
    na_rm: bool | None = None,
    **other_args: Any,
) -> LayerSpec

Sina plot: points spread within the violin outline.

Parameters:

  • mapping (FeatureSpec, default: None ) –

    Aesthetic mapping from aes().

  • data (DataFrame or dict, default: None ) –

    Layer data; inherits the plot data when None.

  • stat (str, default: None ) –

    Statistical transformation, by name.

  • position (str or FeatureSpec, default: None ) –

    Position adjustment: a name such as "dodge" or a position_*() spec.

  • show_legend (bool, default: None ) –

    False hides this layer from the legend.

  • inherit_aes (bool, default: None ) –

    False ignores the plot's default mapping for this layer.

  • manual_key (str or FeatureSpec, default: None ) –

    A legend key for this layer, as in lets_plot; not supported yet (ggrust warns).

  • sampling (str or FeatureSpec, default: None ) –

    lets_plot sampling; accepted and ignored, as ggrust draws every row.

  • tooltips (FeatureSpec or list of str, default: None ) –

    Tooltip content: layer_tooltips(), a list of column names, or "none" to disable tooltips (HTML output).

  • orientation (str, default: None ) –

    Set to "y" to draw the geom along the y axis.

  • seed (int, default: None ) –

    Random seed, for reproducible results.

  • show_half (float, default: None ) –

    Draw only half of each violin: -1 left, 1 right, 0 both.

  • quantiles (list of float, default: None ) –

    Quantiles to draw lines at, each in [0, 1].

  • scale (float, default: None ) –

    Multiplier of the pixel size.

  • trim (bool, default: None ) –

    True trims the density to the data range.

  • tails_cutoff (float, default: None ) –

    Density tails are cut where the density falls under this share of the maximum.

  • kernel (str, default: None ) –

    Kernel of the density estimate, e.g. "gaussian".

  • bw (str or float, default: None ) –

    Bandwidth: a number or a rule name such as "nrd0".

  • adjust (float, default: None ) –

    Multiplier of the bandwidth.

  • fs_max (float, default: None ) –

    Upper bound of the number of points the density is evaluated at.

  • n (int, default: None ) –

    Number of points the density is evaluated at.

  • color_by (str, default: None ) –

    Aesthetic the color scale applies to ("color" or "fill").

  • fill_by (str, default: None ) –

    Aesthetic the fill scale applies to ("fill" or "color").

  • na_rm (bool, default: None ) –

    True removes rows with missing values silently; otherwise they are removed with a warning.

  • **other_args (Any) –

    Constant aesthetics and the geom's options, as in lets_plot.

Returns:

  • LayerSpec –

    The layer.