Lightweight port of seaborn.FacetGrid. In reaborn, faceting is usually done
by adding + ggplot2::facet_wrap()/facet_grid() to a plot, or via the
figure-level functions (relplot, displot, catplot, lmplot). This
constructor returns a base plot you can map geoms onto.
Usage
FacetGrid(
data,
row = NULL,
col = NULL,
hue = NULL,
col_wrap = NULL,
height = 3,
aspect = 1,
palette = NULL
)Examples
tips <- load_dataset("tips")
FacetGrid(tips, col = "time", hue = "sex") +
ggplot2::geom_point(ggplot2::aes(x = total_bill, y = tip))
FacetGrid(tips, row = "sex", col = "time") +
ggplot2::geom_point(ggplot2::aes(x = total_bill, y = tip))
