Skip to contents

Add basic features to a ggplot2 plot object including title, subtitle and classic `ggplot2::theme_bw` theme.

Usage

iidda_plot_settings(
  plot_object,
  data,
  min_time = "min_time",
  max_time = "max_time",
  descriptor_name = "descriptor_name",
  theme = iidda_theme
)

Arguments

plot_object

a `ggplot2` plot object

data

list containing metadata. If `NULL` data is inherited from `plot_object`.

min_time

name of field in data containing the minimum time period range, defaults to "min_time".

max_time

name of field in data containing the minimum time period range, defaults to "max_time".

descriptor_name

either the name of a field in data containing the descriptor or a string to be used as the plot title. If there are too more than 3 elements in the descriptor field, then `descriptor_variable` is used as the plot title.

theme

ggplot theme

Value

a ggplot2 plot object with title, subtitle and adjusted theme.