Plot length distribution data for a gadget3 model
dplot_ldist.RdThe dplot functions plot data passed to a gadget3 model instead of data from the model or fit objects.
Arguments
- x
A gadget3 ready data frame created using mfdb, g3_data or add_g3_attributes.
- type
Character specifying the plot type: "bar", "ggridges" or "line"
- scales
Character specifying the
scalesargument passed tofacet_wrap. Defaults to"free_y".- dir
Character specifying the direction of the facets ("h" for horizontal, "v" for vertical). See
facet_wrap. Defaults to "v" unlike infacet_wrapto make it easier to follow length and age groups across years.- base_size
Base size parameter for ggplot. See ggtheme.
- ...
Additional arguments passed to
facet_wrap.
Value
A ggplot object.
Examples
data(ldist_example)
dplot_ldist(ldist_example)
dplot_ldist(ldist_example, type = "ggridges")
dplot_ldist(ldist_example, type = "line")