ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

Facets now don't fail if faceting vars are COL, ROW, etc.

Open eliocamp opened this issue 4 years ago • 2 comments

This will close #4138.

Works around the issue of duplicated column names by explicitly selecting either data columns or layout columns in the layout data.frame when needed. Added tests that pass.

reprex :)

library(ggplot2)
mtcars$PANEL <- mtcars$cyl


ggplot(mtcars, aes(hp, mpg)) +
  geom_point() +
  facet_grid(cyl ~  am) 


ggplot(mtcars, aes(hp, mpg)) +
  geom_point() +
  facet_grid(PANEL ~  am) 

Created on 2021-01-12 by the reprex package (v0.3.0)

eliocamp avatar Jan 12 '21 21:01 eliocamp