Update data-visualize.qmd (#1036)

Added example for facet_wrap
This commit is contained in:
Jajo 2022-06-01 09:49:04 +05:30 committed by GitHub
parent 57206d364a
commit 63d47c6bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ The variable that you pass to `facet_wrap()` should be discrete.
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy)) +
facet_grid(drv ~ cyl)
facet_wrap(~cyl)
```
To facet your plot on the combination of two variables, add `facet_grid()` to your plot call.