Skip to content

theme_dark

theme_dark() -> FeatureSpec

Use the dark theme: a mid-grey panel with dark grid lines.

ggplot2's theme_dark. The page stays light; only the panel and strips are dark, so bright colors stand out. For a fully dark plot, add a dark flavor such as flavor_darcula().

Returns:

  • FeatureSpec –

    The theme.

Examples:

>>> from ggrust import *
>>> data = {"age": [1, 3, 5, 7, 2, 4, 6, 8, 3, 9],
...         "weight": [4, 6, 6, 7, 8, 12, 14, 15, 2, 3],
...         "pet": ["cat"] * 4 + ["dog"] * 4 + ["rabbit"] * 2}
>>> plot = ggplot(data, aes("age", "weight", color="pet")) + geom_point(size=5)
>>> plot = plot + theme_dark()