plot_ts: Nice plot of time series data

Description Usage Arguments Details Value Notes See Also Examples

View source: R/plot_functions.R

Description

plot_ts plots uneven time series data frame.

Usage

1
2
3
4
5
plot_ts(ts1, ts2 = NULL, xlim = NULL, ylim = NULL, xlab = "time",
  ylab = "y(t)", grid = TRUE, add = FALSE, pch = 16, cex = 1,
  lwd = 3, col = NULL, main = "", extend = 1, error = TRUE,
  type = "p", grid.lwd = 1, grid.col = "lightgray",
  horizon = FALSE, split = FALSE, cex.lab = 1.5, ...)

Arguments

ts1

(matrix) data for time series.

ts2

(data frame) option data for second time series.

xlim, ylim

(vectors) numeric vectors of length 2, giving the x and y coordinates ranges.

xlab, ylab

(strings) titles for the x, y axes.

grid

(logical) plot a grid?

add

(logical) if TRUE then start a new plot

pch

(integer) An integer specifying the symbol to be used as the default in plotting points.

cex

(float) A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default.

lwd

(float) line width.

col

(colour) Specification of the point/line colour.

main

(string) An overall title

extend

(float) Extend the time axis by this factor.

error

(logical) plot errors if available?

type

(character) What type of plot. See ?plot. Options are "p", "b", "l", "n".

grid.lwd

(float) The line width (>0) for the grid.

grid.col

(colour) The colour of the grid.

horizon

(logical or float) make a 'horizon' style plot?

cex.lab

(float) The magnification to be used for x and y labels relative to the current setting of cex.

...

(anything) any other graphical keywords to be passed to plot(...)

Details

Makes a nice plot of some time series data. The data are input as a data frame

Value

None.

Notes

Input data: note that the input data dat is not a traditional R time series object. Such objects are only suitable for regularly sampled data. These plotting functions are designed to work with data of arbitrary sampling, we therefore need to explicitly list times and values. The input objects is a matrix with at least two columns called t (time) and y (value). An error of the value may be provided by a dy column. If the times are not points but bins of finite width, the width of each time bin may be specified with a dt column. Any other columns are ignored.

See Also

plot_ts

Examples

1
plot_ts(drw)

svdataman/gin documentation built on March 12, 2021, 7:37 a.m.