| xplot_forest | R Documentation |
Manually generate a forest-style plot (point + interval per category)
from an xpdb object. This is a generic, low-level renderer in the same
spirit as xplot_boxplot()/xpose::xplot_scatter(): it has no built-in knowledge
of covariate associations, prm_cov(), or any other specific data
source – it just draws a point + interval (and, per type, a
reference guide line) from whatever mapping/pre-fetched opt data
it's given. See cov_forest() for the covariate-association-specific
wrapper that prepares that mapping from prm_cov() and calls this
function to render it.
xplot_forest(
xpdb,
mapping = NULL,
type = "pi",
region = NULL,
orientation = "y",
xscale = "continuous",
yscale = "discrete",
title = NULL,
subtitle = NULL,
caption = NULL,
tag = NULL,
plot_name = "forest",
gg_theme,
xp_theme,
opt,
violin_opt,
quiet,
...
)
xpdb |
< |
mapping |
|
type |
See Details. |
region |
< |
orientation |
Defaults to |
xscale |
Defaults to |
yscale |
Defaults to |
title |
Plot title |
subtitle |
Plot subtitle |
caption |
Plot caption |
tag |
Plot tag |
plot_name |
Metadata name of plot |
gg_theme |
As in |
xp_theme |
As in |
opt |
Processing options for fetched data (one row per category). |
violin_opt |
Processing options for the violin layer's data (one
row per draw), only used/required when |
quiet |
Silence extra debugging output |
... |
Any additional aesthetics, or overrides for the reference
line (eg |
For type-based customization of plots:
p point (from geom_point) – the effect estimate
i interval (from geom_linerange) – the confidence/credible
interval
l reference line through the theme's vline_xintercept/
hline_yintercept (0 by default; a ratio-style forest plot will
typically override this to 1, see cov_forest())
v violin/density (from geom_violin), showing the
distribution behind an interval (eg simulation draws) – requires
violin_opt and a violin_x/violin_y mapping, see above
r shaded reference region (from geom_rect) spanning
region (default c(0.8, 1.25)), eg a bioequivalence-style
"no relevant effect" band; drawn behind every other layer
The desired plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.