plotnine.stat_bindot
stat_bindot(=None,
mapping=None,
data*,
="dotplot",
geom="identity",
position=False,
na_rm=None,
bins=None,
binwidth=None,
origin=0.9,
width="x",
binaxis="dotdensity",
method="bygroup",
binpositions=False,
drop=True,
right=None,
breaks**kwargs
)
Binning for a dot plot
Parameters
mapping : aes = None
-
Aesthetic mappings created with aes. If specified and
inherit_aes=True
, it is combined with the default mapping for the plot. You must supply mapping if there is no plot mapping.Aesthetic Default value x y after_stat('count')
The bold aesthetics are required.
Options for computed aesthetics
"count" # number of points in bin "density" # density of points in bin, scaled to integrate to 1 "ncount" # count, scaled to maximum of 1 "ndensity" # density, scaled to maximum of 1
data : DataFrame = None
-
The data to be displayed in this layer. If
None
, the data from from theggplot()
call is used. If specified, it overrides the data from theggplot()
call. geom : str | geom = "dotplot"
-
The statistical transformation to use on the data for this layer. If it is a string, it must be the registered and known to Plotnine.
position : str | position = "identity"
-
Position adjustment. If it is a string, it must be registered and known to Plotnine.
na_rm : bool = False
-
If
False
, removes missing values with a warning. IfTrue
silently removes missing values. bins : int = None
-
Number of bins. Overridden by binwidth. If
None
, a number is computed using the freedman-diaconis method. binwidth : float = None
-
When
method="dotdensity"
, this specifies the maximum binwidth. Whenmethod="histodot"
, this specifies the binwidth. This supersedes thebins
. origin : float = None
-
When
method="histodot"
, origin of the first bin. width : float = 0.9
-
When
binaxis="y"
, the spacing of the dotstacks for dodging. binaxis : Literal["x", "y"] = "x"
-
Axis to bin along.
method : Literal["dotdensity", "histodot"] = "dotdensity"
-
Whether to do dot-density binning or fixed widths binning.
binpositions : Literal["all", "bygroup"] = "bygroup"
-
Position of the bins when
method="dotdensity"
. The value -bygroup
- positions of the bins for each group are determined separately. -all
- positions of the bins are determined with all data taken together. This aligns the dots stacks across multiple groups. drop : bool = False
-
If
True
, remove all bins with zero counts. right : bool = True
-
When
method="histodot"
,True
means include right edge of the bins and ifFalse
the left edge is included. breaks : FloatArray = None
-
Bin boundaries for
method="histodot"
. This supersedes thebinwidth
andbins
. **kwargs : Any = {}
-
Aesthetics or parameters used by the
geom
.