Skip to content

geom_qq2_line

geom_qq2_line(
    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,
    quantiles: Sequence[Number] | None = None,
    color_by: str | None = None,
    na_rm: bool | None = None,
    **other_args: Any,
) -> LayerSpec

Draw the line through two quantiles of two samples, to read geom_qq2 against.

Map x and y.

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: "qq2_line" ) –

    The statistical transformation.

  • 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 ) –

    The key to show in the manual legend.

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

    Rows to draw: a sampling_*() spec, an int n (sampling_random(n)) or "none". Default: every row.

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

    Tooltip content: layer_tooltips(), a list of column names, or "none".

  • quantiles (list of float, default: [0.25, 0.75] ) –

    The two probabilities the line passes through.

  • color_by (str, default: None ) –

    Aesthetic the color scale applies to.

  • na_rm (bool, default: None ) –

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

  • **other_args (Any) –

    Constant aesthetics such as color="red", size=3.

Returns:

  • LayerSpec –

    The layer.

Examples:

>>> from ggrust import *
>>> data = {"height": [160.0, 172.0, 181.0, 168.0, 175.0], "other": [2.0, 4.0, 3.0, 6.0, 5.0]}
>>> plot = ggplot(data, aes("height", "other")) + geom_qq2_line()