stlines | R Documentation |
To visualize time series over space.
stlines(
stdata,
spatial,
group = NULL,
nmax.group = NULL,
xscale = 1,
yscale = 1,
colour = NULL,
...
)
stpoints(
stdata,
spatial,
group = NULL,
nmax.group = NULL,
xscale = 1,
yscale = 1,
colour = NULL,
...
)
stdata |
matrix with the data, each column is a location. |
spatial |
an object with one of class defined in the sp package. |
group |
an integer vector indicating to which spatial unit each time series belongs to. Default is NULL and them it is assumed that each time series belongs o each spatial unit. |
nmax.group |
an integer indicating the maximum number of time series to be plotted over each spatial unit. Default is NULL, so all will be drawn. |
xscale |
numeric to define a scaling factor in the horizontal direction. |
yscale |
numeric to define a scaling factor in the vertical direction. |
colour |
color (may be a vector, one for each time series).
Default is NULL and it will generate colors considering the
average of each time series.
These automatic colors are defined using the |
... |
further arguments to be passed for the lines function. |
Scaling the times series is needed before drawing it over the map.
The area of the bounding box for the spatial object
divided by the number of locations is the standard scaling factor.
This is further multiplied by the user given xcale
and yscale
.
add lines to an existing plot
stlines()
: each time series over the map centered at the location.
stpoints()
: each time series over the map centered at the location.
if there are too many geographical locations, it will not look good
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.