Skip to contents

Plot calendar panel

Usage

plot_calendar(
  phylepic,
  fill = NULL,
  weeks = TRUE,
  week_start = getOption("phylepic.week_start"),
  labels = NULL,
  labels.params = list(size = 3, fontface = "bold", colour = "white")
)

Arguments

phylepic

Object of class "phylepic".

fill

Variable in metadata table to use for the fill aesthetic (tidy-eval).

weeks

When TRUE, bin the date axis by weeks.

week_start

Day the week begins (defaults to Monday). Can be specified as a case-insensitive English weekday name such as "Monday" or an integer. Since you generally won't want to mix definitions, it is more convenient to control this globally with the "phylepic.week_start" option, e.g. options(phylepic.week_start = "Monday").

labels

Controls the format of date labels on calendar tiles. If NULL, no labels are drawn. If a character scalar, controls the date format (see strptime()).

labels.params

Passed to ggplot2::geom_text() if labels are drawn.

Value

If phylepic is specified returns a ggplot, otherwise a function that when passed a "phylepic" object produces a ggplot for use with plot.phylepic().

See also

Other phylepic plots: plot.phylepic(), plot_bars(), plot_epicurve(), plot_tree()