tsPlotMP: Time Series Plots

Description Usage Arguments Author(s) Examples

View source: R/tsPlotMP.R

Description

Plot time series with specific plotting parameters

Usage

1
2
3
tsPlotMP(ret, add.grid = FALSE, cex = 1, layout = NULL, type = "l",
  yname = "RETURNS (%)", scaleType = "free", stripLeft = TRUE,
  main = NULL, lwd = 1, color = "black", zeroLine = TRUE)

Arguments

ret

an time series exposure/return object

add.grid

logical varible.If 'TRUE', type = c('l', 'g'); If 'FALSE', type = c('l')

cex

a numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. Default is 1.0

layout

layout is a numeric vector of length 2 or 3 giving the number of columns, rows, and pages (optional) in a multipanel display.

type

character. type of the plot; "l" denotes a line, "p" denotes a point, and "b" and "o" both denote both together.deafault is "l".

yname

character or espression giving label(s) for the y-axis

scaleType

scaleType controls if use a same scale of y-axis, choose from c('same', 'free')

stripLeft

logical variable to choose the position of strip, "TRUE" for drawing strips on the left of each panel, "FALSE" for drawing strips on the top of each panel

main

Typically a character string or expression describing the main title.

lwd

The line width, a positive number, defaulting to 1

color

A specification for the default plotting color. Default is black.

zeroLine

logical varible to choose add a dotted horizontal line at the zero vertical distance

Author(s)

Douglas Martin, Lingjie Yi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Load the data
data("stocks145scores6")
dat = stocks145scores6
returns = tapply(dat$RETURN,list(dat$DATE,dat$TICKER),I)
ret = xts(returns[,1:5],as.yearmon(rownames(returns)))

#generate return time series plot               
tsPlotMP(ret, color = 'Blue')
tsPlotMP(ret, scaleType = "same", zeroLine = FALSE)
tsPlotMP(ret, stripLeft = FALSE, main = 'Time Series Plot')
 
   

AvinashAcharya/Test_factorAnalytics documentation built on May 5, 2019, 9:22 a.m.