A modified ggplot2 black and white theme with bold text elements. By
default, the plot title, subtitle, caption, axis titles, and legend title
support markdown/HTML via ggtext::element_markdown().
Arguments
- markdown
Logical; if
TRUE(default), the plot title, subtitle, caption, axis titles, and legend title useggtext::element_markdown(), so labels can contain markdown/HTML such as"*italic*","**bold**", or"log<sub>2</sub> FC". Use"<br>"for line breaks in these labels instead of"\n", which markdown/HTML rendering ignores. Axis tick labels and legend text are left as plainggplot2::element_text()(they can still be switched toggtext::element_markdown()manually, e.g.theme(axis.text.x = ggtext::element_markdown(angle = 45))). Note that whenTRUE, further overriding one of the markdown elements (plot title/subtitle/caption, axis titles, or legend title) withggplot2::element_text()errors in ggplot2 >= 4.0 ("Only elements of the same class can be merged"); useggtext::element_markdown()for that override instead, or setmarkdown = FALSEfor plainggplot2::element_text()elements throughout.
