Learn R Programming

trajectories (version 0.2-9)

stcube: Draw a space-time cube.

Description

Draw a space-time cube for a Track, TRacks, TracksCollection, difftrack or STI(DF) class.

Usage


# S4 method for Track
stcube(x, xlab = "x", ylab = "y", zlab = "t", type = "l",
	aspect, xlim = stbox(x)[[1]] + c(-0.1,0.1) * diff(stbox(x)[[1]]),
	         ylim = stbox(x)[[2]] + c(-0.1,0.1) * diff(stbox(x)[[2]]), 
	zlim = stbox(x)$time, showMap = FALSE, mapType = "osm", 
	mapZoom = NULL, ..., y, z)
# S4 method for Tracks
stcube(x, xlab = "x", ylab = "y", zlab = "t", type = "l",
	aspect, xlim, ylim, zlim, showMap = FALSE, mapType = "osm",
	normalizeBy = "week", mapZoom = NULL, ..., y, z, col)
# S4 method for TracksCollection
stcube(x, xlab = "x", ylab = "y", zlab = "t",
	type = "l", aspect, xlim, ylim, zlim, showMap = FALSE, mapType = "osm",
	normalizeBy = "week", mapZoom = NULL, ..., y, z, col)
# S4 method for difftrack
stcube(x, showMap = FALSE, mapType = "osm", normalizeBy = "week", ..., y, z)
# S4 method for STI
stcube(x, xlab = "x", ylab = "y", zlab = "t", type = "p", aspect, 
                       xlim = stbox(x)[[1]] + c(-0.1,0.1) * diff(stbox(x)[[1]]),
	                     ylim = stbox(x)[[2]] + c(-0.1,0.1) * diff(stbox(x)[[2]]), 
	                     zlim = stbox(x)$time, 
                       showMap = FALSE, mapType = "osm", mapZoom = NULL, ..., y, z)
# S4 method for STIDF
stcube(x, xlab = "x", ylab = "y", zlab = "t", type = "p", aspect, 
                       xlim = stbox(x)[[1]] + c(-0.1,0.1) * diff(stbox(x)[[1]]),
	                     ylim = stbox(x)[[2]] + c(-0.1,0.1) * diff(stbox(x)[[2]]),
	                     zlim = stbox(x)$time, 
                       showMap = FALSE, mapType = "osm", mapZoom = NULL, col, ..., y, z)

Value

A space-time cube.

Arguments

x

An object of class Track, Tracks, or TracksCollection or difftrack.

xlab, ylab, zlab, type, aspect, xlim, ylim, zlim

Arguments passed to plot3d() of package rgl.

showMap

Flag if a basemap is to be shown on the xy plane; for this to function, you may need to load library raster first, see also the stcube demo script.

mapType

The tile server from which to get the map. Passed as type to openmap() of package OpenStreetMap.

normalizeBy

An abstract time period (either week or day) to be normalized by.

mapZoom

Set a zoom level for the map used as background. Null will use the osm package default strategie.

y, z, col

Ignored, but included in the method signature for implementation reasons.

...

Additional arguments passed to plot3d() of package rgl.

Examples

Run this code
if (FALSE) demo(stcube)

Run the code above in your browser using DataLab