Plot age distribution data for a gadget3 model
dplot_adist.Rd
The dplot functions plot data passed to a gadget3 model instead of data from the model or fit objects.
Usage
dplot_adist(
x,
type = "bar",
color_palette = scales::brewer_pal(palette = "Set1"),
scales = "fixed",
ncol = NULL,
base_size = 8
)
Arguments
- x
A gadget3 ready data frame created using mfdb, g3_data or add_g3_attributes.
- type
Character specifying the plot type: "bar" or "ggridges".
- color_palette
A function defining the color palette to be used for fill of bars.
- scales
Character defining the
facet_wrap
scales
argument to use.- ncol
Number of columns passed to
facet_wrap
- base_size
Base size parameter for ggplot. See ggtheme.
Value
A ggplot object.
Examples
data(aldist_example)
dplot_adist(aldist_example)
dplot_adist(aldist_example, type = "ggridges")