Skip to content

label_value

label_value(
    *,
    multi_line: bool | None = None,
    sep: str | None = None,
) -> Labeller

Label facet strips with the value alone (the default).

Call it to change options: label_value(multi_line=False) joins the values of several faceting columns into one strip ("4, f").

Examples:

>>> from ggrust import *
>>> data = {"age": [1, 3, 2, 4], "weight": [4, 6, 8, 12], "pet": ["cat", "cat", "dog", "dog"]}
>>> plot = ggplot(data, aes("age", "weight")) + geom_point()
>>> plot = plot + facet_wrap("pet", labeller=label_value)