Skip to content

stat_qq_line

stat_qq_line(
    mapping: FeatureSpec | None = None,
    *,
    geom: str | None = None,
    **options: Any,
) -> LayerSpec

Draw the fitting line of a Q-Q plot (stat="qq_line"), ggplot2's stat_qq_line.

Parameters:

  • mapping (FeatureSpec, default: None ) –

    Aesthetic mapping from aes(); map sample.

  • geom (str, default: "qq_line" ) –

    Geom that draws the line, e.g. "path".

  • **options (Any) –

    As geom_qq_line().

Returns:

  • LayerSpec –

    The layer.

Examples:

>>> from ggrust import *
>>> data = {"height": [160.0, 172.0, 181.0, 168.0, 175.0]}
>>> plot = ggplot(data, aes(sample="height")) + stat_qq() + stat_qq_line()