Skip to contents

This function annotates the chart with the frequency used in the x-axis, placing a text label on the top-left of the plot. It automatically detects and labels daily, weekly, monthly, quarterly and annual frequencies. For other frequencies or custom text strings, you can use the label argument.

Usage

annotate_frequency(
  label = "default",
  font_family = getOption("fedplot.font_family"),
  font_size = getOption("fedplot.font_size") * 7L/8L
)

Arguments

label

Text to be added. If equal to "" or "default", it will be inferred based on the x-axis variable.

font_family

Font family. If empty, it will default to Franklin Gothic Condensed (unless the "fedplot.font_family" option is overwritten).

font_size

Font size. If empty, will default to size 7 (unless the "fedplot.font_size" option is overwritten).

Value

None