Plot a bar chart of row counts conditioned on the categorical variable
faceted on a second categorical variable,
refinevar. Each faceted plot
also shows a "shadow plot" of the totals conditioned on
ShadowPlot(frm, condvar, refinevar, title, ..., ncol = 1)
data frame to get values from.
name of the primary conditioning variable (a categorical variable, controls x-axis).
name of the second or refining conditioning variable (also a categorical variable, controls faceting).
title to place on plot.
no unnamed argument, added to force named binding of later arguments.
numeric: number of columns in facet_wrap.
a ggplot2 bar chart counting examples grouped by condvar, faceted by refinevar.
This plot enables comparisons of subpopulation totals across both
By default, the facet plots are arranged in a single column. This can be changed
with the optional
Please see here for some interesting discussion https://drsimonj.svbtle.com/plotting-background-data-for-groups-with-ggplot2.
ShadowPlot(mtcars, "carb", "cyl", title = "Number of example cars by carb and cyl counts")