plotnine.qplot

qplot(
    x=None,
    y=None,
    data=None,
    facets="",
    margins=False,
    geom="auto",
    xlim=None,
    ylim=None,
    log=None,
    main=None,
    xlab=None,
    ylab=None,
    asp=None,
    **kwargs
)

Quick plot

Parameters

x : Optional[str | Iterable[Any] | range] = None

x aesthetic

y : Optional[str | Iterable[Any] | range] = None

y aesthetic

data : Optional[DataLike] = None

Data frame to use (optional). If not specified, will create one, extracting arrays from the current environment.

geom : str | list[str] | tuple[str] = "auto"

geom(s) to do the drawing. If auto, defaults to ‘point’ if x and y are specified or ‘histogram’ if only x is specified.

facets : str = ""

Facets

margins : bool | list[str] = False

variable names to compute margins for. True will compute all possible margins. Depends on the facetting.

xlim : Optional[TupleFloat2] = None

x-axis limits

ylim : Optional[TupleFloat2] = None

y-axis limits

log : Optional[Literal["x", "y", "xy"]] = None

Which (if any) variables to log transform.

main : Optional[str] = None

Plot title

xlab : Optional[str] = None

x-axis label

ylab : Optional[str] = None

y-axis label

asp : Optional[float] = None

The y/x aspect ratio.

**kwargs : Any = {}

Arguments passed on to the geom.

Returns

ggplot

ggplot object