stcube: Draw a space-time cube.

stcubeR Documentation

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 signature '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 signature '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 signature '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 signature 'difftrack'
stcube(x, showMap = FALSE, mapType = "osm", normalizeBy = "week", ..., y, z)
## S4 method for signature '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 signature '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)

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.

Value

A space-time cube.

Examples

## Not run: demo(stcube)

trajectories documentation built on Sept. 11, 2024, 8:48 p.m.