Learn R Programming

RSurvey (version 0.6-0)

PlotTimeSeries: Plot Temporal Data

Description

Draws a time-series plot with points and connecting lines.

Usage

PlotTimeSeries(x, y = NULL, xlim = NULL, ylim = NULL, ylab = NULL, 
               tgap = NULL, width = 7, cex.pts = 1, 
               pointsize = 12, fmt = NULL, axis.side = 1:2, 
               minor.ticks = FALSE, ticks.inside = FALSE)

Arguments

x
POSIXct; a vector specifying x values.
y
numeric; a vector specifying y values.
xlim
POSIXct; 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.
tgap
numeric; time gap exceedance level in seconds.
width
numeric; the width of the plotting window canvas in inches.
cex.pts
numeric; the amount by which point symbols should be magnified relative to the default.
pointsize
integer; the point size of plotted text.
fmt
character; date-time format for x axis tic mark labels, see strptime.
axis.side
integer; the 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.
minor.ticks
logical; if TRUE minor tickmarks are added to the plot; its default is FALSE.
ticks.inside
logical; if TRUE tickmarks are placed inside the plot region; its default is FALSE.

Details

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

See Also

plot

Examples

Run this code
data(project)
d <- Data("data.pts")
PlotTimeSeries(x = d$t, y = d$z)
PlotTimeSeries(x = d$t, y = d$z, tgap = 3000)

Run the code above in your browser using DataLab