stplot: produce trellis plot for STxDF object

stplotR Documentation

produce trellis plot for STxDF object

Description

create trellis plot for ST objects

Usage

 
stplot(obj, ...)
stplot.STFDF(obj, names.attr = trimDates(obj), ...,
	as.table = TRUE, at, cuts = 15, scales = list(draw = FALSE), 
	animate = 0, mode = "xy", scaleX = 0, auto.key = list(space = key.space), 
	main, key.space = "right", type = "l", do.repeat = TRUE, range.expand = 0.001)
stplot.STIDF(obj, ..., names.attr = NULL, as.table = TRUE,
	scales = list(draw = FALSE), xlab = NULL, ylab = NULL,
	type = "p", number = 6, tcuts, sp.layout = NULL, xlim =
	bbox(obj)[1, ], ylim = bbox(obj)[2, ])

Arguments

obj

object of a class deriving from ST

names.attr

names that will be used in the strip; trimDates(obj) trims "-01" ending(s) from printed Dates

as.table

logical; if TRUE, time will increas from top to bottom; if FALSE, time will increase from bottom to top

at

values at which colours will change; see levelplot

cuts

number of levels the range of the attribute would be divided into

animate

numeric; if larger than 0, the number of seconds between subsequent animated time steps (loop; press ctrl-C or Esc to stop)

mode

plotting mode; if "xy", maps for time steps are plotted; if "xt", a space-time plot is constructed (see argument scaleX, but read details below); if "ts", multiple-locations time series are plotted in a single plot, or in a separate panel for each attribute; if "tp" single- or multi-attribute time series are plotted in multiple panels, one panel per location.

scaleX

integer: 0, 1 or 2; when mode is "xt", used to determine whether the index of the spatial location is shown (0), the x coordinate (1) or the y coordinate (2).

auto.key

see the auto.key argument in xyplot

main

character; plot title, use NULL to omit title

key.space

character; see xyplot

scales

scales drawing; see scales argument of xyplot

xlab

x-axis label

ylab

y-axis label

type

character; use 'l' for lines, 'p' for symbols, 'b' for both lines and symbols

do.repeat

logical; repeat the animation in an infinite loop?

range.expand

numeric; if at is not specified, expand the data range with this factor to cover all values

number

number of time intervals, equally spaced

tcuts

time cuts in units of index(obj); this overrides number

sp.layout

list or NULL; see spplot

...

arguments passed on to spplot in case of plotting objects of class STFDF or STIDF, or to xyplot in case of stplot.STIDF

xlim

numeric, x range

ylim

numeric, y range

Value

In non-animation and "xy" mode, stplot is a wrapper around spplot, that automically plots each time stamp in a panel. The returned value is is a lattice plot.

In "xt" mode, a space-time plot with space on the x-axis and time on the y-axis is plotted. By default, the space ID is plotted on the x-axis, as space can be anything (points, polygons, grid cells etc). When scaleX is set to 1 or 2, the x- resp. y-coordinates of the spatial locations, obtained by coordinates, is used instead. Beware: when the x-coordinate is plotted, and for each (x,t) element multiple y-coordinates are sent to the plot, it is not clear which (x,y,t) value becomes the plotted value, so slicing single y values is adviced – no checking is done. The returned value is is a lattice plot.

In animation mode (animate > 0), single maps are animated in an endless loop, with animate seconds between each. No proper value is returned: the loop needs to be interrupted by the user.

Methods

stplot

signature(x = "STFDF"): plots object of class STFDF

stplot

signature(x = "STSDF"): plots object of class STSDF

stplot

signature(x = "STI"): plots object of class STI

stplot

signature(x = "STIDF"): plots object of class STIDF

stplot

signature(x = "STT"): plots object of class STT

stplot

signature(x = "STTDF"): plots object of class STTDF

Note

vignette("spacetime") contains several examples

References

https://www.jstatsoft.org/v51/i07/


spacetime documentation built on Sept. 12, 2024, 7:42 a.m.