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:
- x
str
| array_like x aesthetic
- y
str
| array_like y aesthetic
- data
dataframe
Data frame to use (optional). If not specified, will create one, extracting arrays from the current environment.
- geom
str
|list
geom(s) to do the drawing. If
auto
, defaults to 'point' ifx
andy
are specified or 'histogram' if onlyx
is specified.- facets
str
Facets
- marginsbool |
list
[str
] variable names to compute margins for. True will compute all possible margins. Depends on the facetting.
- xlim
tuple
x-axis limits
- ylim
tuple
y-axis limits
- log
str
in
{'x', 'y', 'xy'}
Which (if any) variables to log transform.
- main
str
Plot title
- xlab
str
x-axis label
- ylab
str
y-axis label
- asp
str
|float
The y/x aspect ratio.
- **kwargs
dict
Arguments passed on to the geom.
- x
- Returns:
- p
ggplot
ggplot object
- p