tPlot: Plot Time Series

Description Usage Arguments Value Graphical Parameters Examples

Description

tPlot plots economic time series data, taking into consideration object attributes such as 'units' and 'title'. tPlot works best with data collecting functions, such as fred in the the recon package.

Usage

1
2
3
4
5
6
7
8
tPlot(..., right = NULL, data = NULL, time = NULL, xlim = NULL,
  ylim = NULL, yRlim = NULL, ticks = c(8, 5), theme = "std",
  col = NULL, colBG = NULL, colGrid = NULL, colAxes = NULL,
  colPlot = NULL, colBar = NULL, mar = c(3.5, 3.5, 2, 1),
  bars = "cycle", las = 0, cex = 1, cex.lab = 1, cex.axis = 0.75,
  lty = NULL, lwd = 1, xlab = "Date", ylab = NULL, yRlab = NULL,
  title = NULL, ltyAxis = "solid", lwdAxis = 1, lwdTicks = lwdAxis,
  leg = "auto")

Arguments

...

'xts' objects to be plotted

right

'xts' object to be plotted on the right axis

data

data object containing ... and right

time

time period to restrict plot. Uses 'xts' convention, e.g., '1970-01/1972-06-03'.

xlim

Date vector of limits on the x-axis

ylim

numeric vector of limits on the left y-axis

yRlim

numeric vector of limits on the right y-axis

ticks

numeric vector of the desired number of ticks on (x,y) axis

theme

graphical theme of the plot. Only 'std' is supported.

col

character vector of color names to use for lines

colBG

background color

colGrid

color of grids

colAxes

color of axes

colPlot

color of plot background

colBar

color of bars (business cycle)

mar

inner margins outside of plot. c(bottom,left,top,right)

bars

object containing Peaks and Troughs to plot. 'cycle' (default) plots business cycle bars

las

tick label orientation on axis

cex

size of objects in plot

cex.lab

size of labels

cex.axis

size of axis

lty

line type. examples: 'solid', 'dotted', 'dashed'

lwd

line width

xlab

character label of x-axis

ylab

character label of left y-axis

yRlab

character label of right y-axis

title

character title of plot

ltyAxis

line type of axis

lwdAxis

line width of axis

lwdTicks

line width of ticks

leg

vector of character names to use in the legend. 'auto' uses object attributes

Value

plot of time-series

Graphical Parameters

If NULL, then value is chosen either by theme or with object attributes.

Examples

1
2
3
4
5
GDPgap <- fred('gap')
cycU <- fred('cyclical')
GDP <- fred('GDPC1')
tPlot(GDPgap, cycU)
tPlot(GDPgap, right = GDP)

cmann3/econ311 documentation built on May 31, 2019, 1:14 p.m.