Learn R Programming

RSurvey (version 0.5.0)

plotTime: Plot Temporal Data

Description

A time series plot is drawn with points and connecting lines.

Usage

plotTime(x, y = NULL, xlim = NULL, ylim = NULL, ylab = NULL, gap = NULL, 
width = 7, pointsize = 10, fmt = "%H:%M:%OS\n%Y-%m-%d")

Arguments

x
POSIXlt; a vector specifying x values
y
numeric; a vector specifying y values
xlim
POSIXlt; the x limits (x1,x2) of the plot
ylim
numeric; the y limits (y1,y2) of the plot
ylab
character; the label for the y axis
gap
numeric; time gap exceedance level in seconds
width
numeric; the width of the plotting window canvas in inches
pointsize
integer; the point size of plotted text
fmt
character; date-time format for x axis tic mark labels, see strptime

Details

Line segments will not be drawn where time differences between consecutive points are greater than gap.

See Also

plot

Examples

Run this code
data(project)
d <- srvy.dat("data.pts")
plotTime(x = d$t, y = d$z)
plotTime(x = d$t, y = d$z, gap = 3000)

Run the code above in your browser using DataLab