timeline_plot: timeline_plot

Description Usage Arguments Value Examples

View source: R/timeline.R

Description

Create a timeline plot with one (n(t)) or two (if n_base is present in the data) lines.

Usage

1
2
3
4
5
6
timeline_plot(dat, smooth_bw = 0, smooth_kernel = "box",
  ytitle = "count", plot_bgcolor = "#ECF0F5",
  paper_bgcolor = "#FCFCFC", linecolor = "darkgreen",
  fillcolor = "steelblue", hovermode = "x", ticksuffix = "",
  ytitle_fontsize = 14, sliderthickness = 0.05, yrange = NULL,
  linenames = NULL)

Arguments

dat

tibble with columns t, n and n_base (optional)

smooth_bw

bandwidth for kernel-smoothing the curve, in units of the time step in the data. If 0 - no smoothing.

smooth_kernel

kernel used in smoothing the curve: 'box' or 'normal'.

ytitle

title for the y-axis

plot_bgcolor

plot background color

paper_bgcolor

plot paper color

linecolor

line color

fillcolor

fill color

hovermode

passed to plotly

ticksuffix

tick suffix

ytitle_fontsize

fontsize for the y-axis title

sliderthickness

thickness (relative height) of the range slider

yrange

range for the y-axis. If NULL, will be determined from the data

linenames

name for the line(s), to show in the hoverplates. If n_base is present in the data, should be length 2.

Value

plotly object

Examples

1
#

rushkin/bitsandends documentation built on Oct. 21, 2020, 11:43 a.m.