Faceting in R
Learn the details of the faceting feature in R.
Advanced faceting
Up until now, we’ve faceted our plots in the qplot()
function using the facets=
argument. This has two potential drawbacks:
- Sometimes, we have many panes we’d like to create in a single dimension, so many that they would need to wrap around into multiple rows.
- While it can be convenient to have our plots all be on the same axes, sometimes we don’t want that.
For example, when we don’t use scales='free'
, the figure has a lot of unused space in the left panel.
There are two functions for faceting outside of what’s built into the qplot()
function. The first is ...