ggforce icon indicating copy to clipboard operation
ggforce copied to clipboard

Use `facet_matrix`'s labels in `aes()`

Open mattansb opened this issue 2 years ago • 0 comments

I'd like the have shapes vary by the rows of a facet_matrix, is this possible? How does one access the x/y panel ID?

library(ggplot2)
library(ggforce)

ggplot(mtcars) + 
  geom_point(aes(.panel_x, .panel_y)) + 
  facet_matrix(vars(mpg, cyl), vars(am, hp))

# How to have aes(shape = (.panel_x_var == "hp))?

mattansb avatar Feb 19 '22 13:02 mattansb