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
xpython:str | numpy:array_like

x aesthetic

ypython:str | numpy:array_like

y aesthetic

datadataframe

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

geompython:str | python: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.

facetspython:str

Facets

marginsbool | python:list[python:str]

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

xlimpython:tuple

x-axis limits

ylimpython:tuple

y-axis limits

logpython:str in {'x', 'y', 'xy'}

Which (if any) variables to log transform.

mainpython:str

Plot title

xlabpython:str

x-axis label

ylabpython:str

y-axis label

asppython:str | python:float

The y/x aspect ratio.

**kwargspython:dict

Arguments passed on to the geom.

Returns
pggplot

ggplot object