grantmcdermott / tinyplot

Lightweight extension of the base R graphics system
https://grantmcdermott.com/tinyplot
Apache License 2.0
226 stars 7 forks source link

Facet formula #101

Closed grantmcdermott closed 8 months ago

grantmcdermott commented 8 months ago

Closes #100. Closes #98.

Quick example of facet grid support via a two-sided formula (with some optional facet text styling).

library(plot2)
plot2(
  mpg ~ wt, data = mtcars,
  facet = am ~ cyl, 
  facet.args = list(bg = "grey90"),
  grid = TRUE, frame = FALSE,
  xlim = c(1,6), ylim = c(10, 35),
  main = "am versus cyl"
)

Created on 2024-01-24 with reprex v2.0.2