Description Usage Arguments Value
Create a ggplot2 object for plotting fhx-style demographics on avalanche objects.
1 2 3 4 5 6 | plot_demograph(x, color_group, color_id, facet_group, facet_id,
facet_type = "grid", ylabels = TRUE, yearlims = FALSE,
composite_rug = FALSE, filter_prop = 0.25, filter_min_rec = 2,
filter_min_events = 1, injury_event = FALSE, plot_legend = FALSE,
event_size = c(Scar = 4, Injury = 2, `Pith/Bark` = 1.5),
rugbuffer_size = 2, rugdivide_pos = 2)
|
x |
An |
color_group |
Option to plot series with colors. This is a character vector or factor which corresponds to the series names given in |
color_id |
Option to plot series with colors. A character vector of series names corresponding to groups given in |
facet_group |
Option to plot series with faceted by a factor. A vector of factors or character vector which corresponds to the series names given in |
facet_id |
Option to plot series with faceted by a factor. A vector of series names corresponding to species names given in |
facet_type |
Type of |
ylabels |
Optional boolean to remove y-axis (series name) labels and tick marks. Default is TRUE. |
yearlims |
Option to limit the plot to a range of years. This is a vector with two integers. The first integer gives the lower year for the range while the second integer gives the upper year. The default is to plot the full range of data given by |
composite_rug |
A boolean option to plot a rug on the bottom of the plot. Default is FALSE. Note that composite_rug and facet_group, facet_id cannot be used in the same plot. You must choose facets or a composite rug. |
filter_prop |
An optional argument if the user chooses to include a composite rug in their plot. This is passed to |
filter_min_rec |
An optional argument if the user chooses to include a composite rug in their plot. This is passed to |
filter_min_events |
An optional argument if the user chooses to include a composite rug in their plot. This is passed to |
injury_event |
Boolean indicating whether injuries should be considered recorders. This is passed to |
plot_legend |
A boolean option allowing the user to choose whether a legend is included in the plot or not. Default is FALSE. |
event_size |
An optional numeric vector that adjusts the size of fire event symbols on the plot. Default is |
rugbuffer_size |
An optional integer. If the user plots a rug, this controls the amount of buffer whitespace along the y-axis between the rug and the main plot. Must be >= 2. |
rugdivide_pos |
Optional integer if plotting a rug. Adjust the placement of the rug divider along the y-axis. Default is 2. |
A ggplot object for plotting or manipulation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.