Following the xpose design pattern, this is a generic template
(analogous to xplot_boxplot() or xplot_pairs()) for rendering
already-summarized/binned data as connected points and/or lines across
a (typically discrete, possibly ordered) x variable. It is not tied to
any particular binning or summarization logic -- callers are expected
to shape their data (eg via opt's post_processing) and build a named
implementation on top of it (eg catdv_vs_occ()) rather than calling
it directly for everyday use.
xplot_binned(
xpdb,
mapping = NULL,
group = "variable",
type = "pl",
xscale = "discrete",
yscale = "continuous",
title = NULL,
subtitle = NULL,
caption = NULL,
tag = NULL,
plot_name = "binned",
gg_theme,
xp_theme,
opt,
quiet,
...
)The desired plot
<xp_xtras> or <xpose_data> object
ggplot2 style mapping. Expected to include at least x
and y.
Column name distinguishing multiple summarized series (eg
a variable column). Points/lines/smooths are both connected and
coloured by this column (see xpose::xplot_scatter() for the same
connecting-line convention).
String setting the type of plot to be used: point p, line
l, and smooth s, or any combination thereof.
Defaults to discrete.
Defaults to continuous.
Plot title
Plot subtitle
Plot caption
Plot tag
Metadata name of plot
As in xpose
As in xpose
Processing options for fetched data
Silence extra debugging output
Additional aesthetics, passed to the point, line and
smooth layers.
Unlike xpose::xplot_scatter()'s raw per-subject spaghetti plots,
xplot_binned() assumes the supplied data is already one row per
x/group combination (eg per occasion, per series) -- it does no binning,
aggregation, or tidying of its own.