zeileis · GitHub

Hi @zeileis. I've pushed a few commits directly to your PR—hope that's okay—that seem to have plugged the problem areas. Quick examples...

pkgload::load_all("~/Documents/Projects/tinyplot")
#> ℹ Loading tinyplot
tpar(las = 1)

This was working beforehand and still does (2 x 3 arrangement):

tinyplot(mpg ~ wt, facet = vs ~ gear, data = mtcars)

This one wasn't working correctly beforehand, but now does (3 x 2 arrangement)):

tinyplot(mpg ~ wt, facet = gear ~ vs, data = mtcars)

And here's a more complicated example with multiple variables in the facet formula LHS , which used to trigger an error due to missing values in some facet windows, but now plots everything correctly.

tinyplot(mpg ~ wt, facet = gear:vs ~ cyl, data = mtcars, pch = 16, axes = "l", grid = TRUE)

Compare against equivalent ggplot2 call:

library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  facet_grid(vs+gear~cyl, labeller = labeller(.multi_line = FALSE)) +
  theme_minimal()

Created on 2024-08-18 with reprex v2.1.1

Given that you're on (a well-deserved!) vacation, I imagine that it may be tricky for you to test on your side. But let me know what you think.

Read the original on github.com ↗