Show the same kind of plot for each group. Keeping the scales fixed lets readers compare levels across panels without adjusting for different axes.
Arguments
- facets
Variables to facet by, as with
facet_wrap(), for examplevars(cyl)or~ cyl.- ncol, nrow
Panel layout.
ncoldefaults toNULL, lettingggplot2choose.- scales
Passed to
facet_wrap(). Defaults to"fixed", and warns if you change it, because free scales make panels incomparable.- ...
Further arguments passed to
facet_wrap().
Details
This wraps facet_wrap() with fixed scales and
left-aligned, unboxed strip labels. ggplot2 chooses the layout unless
you specify it. Free scales can help with other questions, but they make
comparisons of levels harder, so the function warns when you request them.
Examples
library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) +
geom_point() +
geom_rangeframe() +
facet_tufte(~ cyl) +
theme_tufte()