Skip to content

ggside

ggside(
    x_pos: Literal["top", "bottom"] | None = None,
    y_pos: Literal["right", "left"] | None = None,
) -> FeatureSpec

Place the side panels (R package ggside).

Parameters:

  • x_pos ((top, bottom), default: "top" ) –

    Side of the x side panel (geom_xside*() layers).

  • y_pos ((right, left), default: "right" ) –

    Side of the y side panel (geom_yside*() layers).

Returns:

  • FeatureSpec –

    The options, added to a plot with +.

Raises:

  • SpecError –

    If a position is not one of the accepted sides.

Examples:

>>> from ggrust import *
>>> data = {"x": [1.0, 2.0, 2.5, 3.0, 4.0], "y": [2.0, 1.0, 3.0, 2.5, 4.0]}
>>> plot = ggplot(data, aes("x", "y")) + geom_point() + geom_xsidehistogram(bins=4)
>>> plot = plot + ggside(x_pos="bottom")