Splits the data by one or more variables and lays the resulting panels out in a rectangular grid, wrapping to a new row as needed.
facet_wrap(vars, ncol = NULL, nrow = NULL, scales = "fixed")A Facet object to add to a plot with +.
ggnext(iris, aes(Sepal.Length, Sepal.Width)) +
geom_point() +
facet_wrap(Species)
#> <ggnext plot>
#> data: 150 x 5
#> aes: x = Sepal.Length, y = Sepal.Width
#> layers: 1
#> coord: cartesian
#> mode: static