Skip to contents

Plot timeseries data

Usage

plot_timeseries(
  data,
  x,
  y,
  breaks = NULL,
  x_label = NULL,
  y_label = NULL,
  title = NULL,
  line_colour = "blue",
  horizontal_y = NULL,
  vertical_x = NULL,
  x_lim = NULL,
  y_lim = NULL
)

Arguments

data

Data to plot

x

Name of column to plot on x-axis, should be datetime, will be converted to Dates using as.Date

y

Name of column to plot on y-axis

breaks

Date break points

x_label

x-axis label

y_label

y-axis label

title

Figure title

line_colour

Line colour

horizontal_y

y-intercept for horizontal line

vertical_x

x-intercept for vertical line

x_lim

Limits for x-axis continous scale, vector passed to scale_x_continuous

y_lim

Limits for y-axis continuous scale, vector passed to scale_y_continous

line_width

Line width

Value

ggplot