Skip to content

ggplot

ggplot(
    data: PlotData | None = None,
    mapping: FeatureSpec | None = None,
) -> PlotSpec

Create a new plot.

Parameters:

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

    Data shared by all layers: polars or pandas DataFrame, pyarrow Table, any object exporting __arrow_c_stream__, or a dict of columns.

  • mapping (FeatureSpec, default: None ) –

    Default aesthetic mapping from aes().

Returns:

  • PlotSpec –

    The plot. Add layers, scales and features with +.