grantmcdermott · GitHub

Closes #576

Note: I settled on the shorter cap (versus caption) argument to better mirror sub, lab etc.

MWE

pkgload::load_all("~/Documents/Projects/tinyplot")
#> ℹ Loading tinyplot
tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris,
         main = "Some flowers",
         sub = "The iris dataset",
         cap = "Source: Anderson (1935)",
         theme = "clean")

Customization:

tinytheme("clean", col.cap = "grey50", adj.cap = 0)
tinyplot(Sepal.Length ~ Petal.Length | Species, data = iris,
         main = "Some flowers",
         sub = "The iris dataset",
         cap = "Source: Anderson (1935)")

One caveat is that sub and cap are effectively substitutes for non-dynamic plots. But I've been careful to document this.

tinytheme()
tinyplot(Sepal.Length ~ Petal.Length, data = iris,
        main = "`sub` and `cap` overlap for default theme",
        sub = "Subtitle", cap = "Caption")

Created on 2026-05-20 with reprex v2.1.1

Read the original on github.com ↗