timeLines: Function to plot multiple time series.

View source: R/timeLines.R

timeLinesR Documentation

Function to plot multiple time series.

Description

Function to plot multiple time series.

Usage

timeLines(
  w,
  x = 1:ncol(w),
  xlim = range(x),
  ylim = range(w, na.rm = TRUE),
  xlab = "",
  ylab = "",
  axis1args = list(at = pretty(x)),
  axis2args = list(at = pretty(ylim), las = 1),
  col = NULL,
  x.expand = 0.35,
  y.labs = rownames(w),
  y.ylabs = NULL,
  yh = 0.7 * diff(range(w[, ncol(w)], na.rm = TRUE))/nrow(w),
  ...
)

Arguments

w

numeric matrix, each line a time series data

x

vector with the x-axis values

xlim

numeric length two vector with x-axis limits

ylim

numeric length two vector with y-axis limits

xlab

label for the x-axis

ylab

label for the y-axis

axis1args

arguments list for x-axis

axis2args

arguments list for y-axis

col

colors for each line drawn

x.expand

numeric to be used as fraction of diff(xlim) as extension of it

y.labs

labels to be added like a legend

y.ylabs

numeric vector with y-values to place y.labs

yh

numeric used as h in cutree(hclust(...)) to arrange the y.labs towards a more equally spaced sequence over y-limits. NOTE: This is only used if y.ylabs is not NULL.

...

further arguments passed further

Value

plot

Examples

timeLines(t(Seatbelts[,3:4]))

eliaskrainski/emisc documentation built on Nov. 18, 2024, 11:02 a.m.