plotnine.qplot

plotnine.qplot(x: str | Iterable[Any] | range | None = None, y: str | Iterable[Any] | range | None = None, data: DataLike | None = None, facets: str = '', margins: bool | list[str] = False, geom: str | list[str] | tuple[str] = 'auto', xlim: TupleFloat2 | None = None, ylim: TupleFloat2 | None = None, log: Literal['x', 'y', 'xy'] | None = None, main: str | None = None, xlab: str | None = None, ylab: str | None = None, asp: float | None = None, **kwargs: Any) Ggplot[source]

Quick plot

Parameters:
xstr | array_like

x aesthetic

ystr | array_like

y aesthetic

datadataframe

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

geomstr | list

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

facetsstr

Facets

marginsbool | list[str]

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

xlimtuple

x-axis limits

ylimtuple

y-axis limits

logstr in {'x', 'y', 'xy'}

Which (if any) variables to log transform.

mainstr

Plot title

xlabstr

x-axis label

ylabstr

y-axis label

aspstr | float

The y/x aspect ratio.

**kwargsdict

Arguments passed on to the geom.

Returns:
pggplot

ggplot object