plotPop.CohortProgression: Function to plot cohort progression by year among several...

View source: R/plotPop.CohortProgression.R

plotPop.CohortProgressionR Documentation

Function to plot cohort progression by year among several models

Description

This function plots cohort progression by year among several models.

Usage

plotPop.CohortProgression(
  mdfr,
  facet_grid = NULL,
  facet_wrap = NULL,
  dodge = 0.2,
  years = NULL,
  mxy = 4,
  nrow = 2,
  lnscale = FALSE,
  scales = "fixed",
  types = c("progression", "byyear"),
  plotPoints = FALSE,
  shapes = "s",
  plotLines = TRUE,
  linetypes = "ms",
  showPlot = FALSE,
  verbose = FALSE
)

Arguments

mdfr
  • melted data.frame with cohort progressions

facet_grid
  • formula for faceting using facet_grid

facet_wrap
  • formula for faceting using facet_wrap

dodge
  • width to dodge overlapping series

years
  • vector of years to include in plots (or NULL for all)

mxy
  • max number of years per page

nrow
  • number of rows per page, when facet_wrap'ing

lnscale
  • use log scale on y axis

scales
  • scales parameter for facet_grid/facet_wrap

types
  • cohort plot types ("progression","byyear")

plotPoints
  • flag to plot points

shapes
  • name of column for ggplot shape factors (defaults to 's' for shell condition)

plotLines
  • flag to plot cohorts as lines

linetypes
  • name of column for ggplot linetype factors (defaults to 'ms' for maturity + shell condition)

showPlot
  • flag (T/F) to show plot

verbose
  • flag (T/F) to print diagnostic information

colour_scale
  • ggplot2 colour scale to substitute for default (if not NULL)

fill_scale
  • ggplot2 fill scale to substitute for default (if not NULL)

Details

Can plot cohort abundance as a progression by stage for each model or as size distributions by year with colours indicating different models.

Value

a list of ggplot2 objects


wStockhausen/rCompTCMs documentation built on Aug. 27, 2024, 7:15 p.m.