| orb_facet | R Documentation |
Faceting draws one panel per level of a grouping variable, laid out in a grid. Comparing many small panels that share a scale is often clearer than overplotting every group in one panel.
orb_facet(by, ncol = NULL, scales = c("fixed", "free_x", "free_y", "free"))
by |
Bare column name to facet by, for example |
ncol |
Number of columns in the grid. The default chooses a roughly square arrangement. |
scales |
Whether panels share their axes: |
An object of class orb_facet, to be added to a plot.
orb(mtcars, x = wt, y = mpg) + orb_points() + orb_facet(cyl)
orb(mtcars, x = wt, y = mpg) + orb_points() +
orb_facet(cyl, ncol = 3, scales = "free")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.