- want to show more variables or dimensions at the same time
- we can use
facet_grid
orfacet_wrap
to do that - you can use different types of figure like scatterplot, line, barplot
- you can use
scale = “free_y”
in facet function to allow different scales in different raws - you can always use
reorder()
to change the order of variables facet_grid
- Let the data expand according to a certain row/column in the figure
- you can facet by two variables and specify which variable goes in rows and which goes in columns
facet_wrap
- jsut to display some groups and don’t need them to appear in the same row or column