stat_bindot ¶
stat_bindot(
mapping: FeatureSpec | None = None,
*,
data: PlotData | None = None,
geom: str = "dotplot",
binwidth: Number | None = None,
bins: int | None = None,
method: Literal["dotdensity", "histodot"] | None = None,
center: Number | None = None,
boundary: Number | None = None,
**other_args: Any,
) -> LayerSpec
Draw a layer from the stacks of a dot plot.
Parameters:
-
mapping(FeatureSpec, default:None) –Aesthetic mapping from
aes(). -
data(DataFrame or dict, default:None) –Layer data; inherits the plot data when None.
-
geom(str, default:"dotplot") –The geom that draws the stacks.
-
binwidth(float, default:None) –Width of a bin; overrides
bins. -
bins(int, default:30) –Number of bins.
-
method((dotdensity, histodot), default:"dotdensity") –dotdensityplaces stacks where the data is,histodotuses equal bins. -
center(float, default:None) –Center of a bin (with
method="histodot"). -
boundary(float, default:None) –Boundary between two bins (with
method="histodot"). -
**other_args(Any) –Other layer options and constant aesthetics.
Returns:
-
LayerSpec–The layer.
Examples:
>>> from ggrust import *
>>> data = {"height": [1.2, 1.3, 1.3, 1.7, 2.0, 2.1]}
>>> plot = ggplot(data, aes(x="height")) + stat_bindot(binwidth=0.2)