geom_xsidebar ¶
geom_xsidebar(
mapping: FeatureSpec | None = None, **kwargs: Any
) -> LayerSpec
Draw bars of counts in the x side panel (R package ggside).
The x side panel sits above the panel (below with ggside(x_pos="bottom")) and shares
its x axis.
Parameters:
-
mapping(FeatureSpec, default:None) –Aesthetic mapping from
aes(). Along x it maps through the main panel's x scale; across the band through the band's own y scale (scale_xsidey_*()). -
**kwargs(Any) –Every other parameter of
geom_bar().
Returns:
-
LayerSpec–The side layer.
Examples:
>>> from ggrust import *
>>> data = {
... "height": [160, 165, 170, 172, 175, 181, 168, 177],
... "weight": [55, 61, 66, 70, 72, 80, 63, 75],
... "sex": ["f", "f", "f", "m", "m", "m", "f", "m"],
... }
>>> plot = ggplot(data, aes("height", "weight")) + geom_point()
>>> plot = plot + geom_xsidebar()