Learn R Programming

timeDate (version 290.84)

plot-methods: Plot Methods

Description

Plot methods for timeDate objects.

Usage

## S3 method for class 'timeDate':
plot(x, y, \dots)
## S3 method for class 'timeDate':
lines(x, y, \dots)
## S3 method for class 'timeDate':
points(x, y, \dots)
## S3 method for class 'timeDate':
axis(side, x, at, format = NULL, labels = TRUE, \dots)

Arguments

x, y, at
an object of class timeDate.
side
an integer specifying which side of the plot the axis is to be drawn on. The axis is placed as follows: 1=below, 2=left, 3=above and 4=right.
format
format - format string.
labels
either a logical value specifying whether annotations are to be made at the tickmarks, or a vector of character strings to be placed at the tickpoints.
...
arguments passed to other methods.

Value

  • returns a summary report of the details of a timeDate object. This includes the starting and end date, the number of dates the format and the financial center in use.

Examples

Run this code
## timeCalendar -
   x <- timeCalendar()
   y <- rnorm(12)

## Plotting :

   plot(x, y, type = "l")
   points(x, y, pch = 19, col = "red")

   plot(x, y, type = "l", xaxt = "n")
   axis.timeDate(1, at = x[c(1, 3, 5, 7, 9, 11)], format = "%b")
   axis.timeDate(1, at = x[12], format = "%Y")

Run the code above in your browser using DataLab