Spruce up your ggplot2 visualizations with formatted text
summary
The ggtext package adds a lightweight HTML/CSS/markdown renderer to ggplot2, with a companion gridtext engine already on CRAN; it implements italics and bold, images in axis labels, and geom_richtext for in-plot labels. Examples show automated species names via glue, colored text matched to semi-transparent fills using scale_fill_identity, and images inserted into tick labels; code uses element_markdown for theme elements. The custom renderer supports fonts, color, superscript/subscript and works for the demonstrated cases, with more HTML/CSS features planned.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:50Stuck overflow example
- 3:10Formatting text with GDText
- 5:20Formatting text with Glue
- 6:30Adding color
- 10:00Other options
- 11:15Code
- 12:50GridText package
- 14:35One word of caution
- 16:35Questions
related talks
14mAdding a Touch of glitr: Developing a Package of Themes on Top of ggplot
18mFrom idea to code to image: Creative data visualizations in R
01h 01m50 ways to show your data
30mFrom plotting to chart porn - Creating slick charts with Matplotlib
19mCracking open ggplot internals with {ggtrace}
12mGraphite: A Library for Data Visualization
19mGrammar of Graphics in Python with Plotnine
38mBuilding a Grammar for Statistical Graphics in Clojure
