Learn R Programming

stopp (version 0.2.3)

plot.stp: Plot a stp object

Description

This function plots the point pattern stored in the stp object given in input, in a three panel plot representing the 3Dplot of the coordinates, and the marginal spatial and temporal coordinates.

Usage

# S3 method for stp
plot(x, tcum = TRUE, marg = TRUE, col = 1, ...)

Arguments

x

An object of class stp

tcum

If TRUE (default option), the temporal point pattern is displayed cumulatively. A barplot is automatically plotted if there are repeated counts (typically with discrete times).

marg

Default to TRUE. If FALSE, only the spatio-temporal point pattern is plotted.

col

The color of the points. Default to "black"

...

additional unused argument

Author

Nicoletta D'Angelo

See Also

stp, print.stp, summary.stp

Examples

Run this code


set.seed(2)
df <- data.frame(cbind(runif(100), runif(100), runif(100)))

stp1 <- stp(df)
#plot
plot(stp1)

#cumulative time occurrances
plot(stp1, tcum = FALSE)

#change color of points
plot(stp1, col = "blue")

#display only in space-time
plot(stp1, marg = FALSE)

#discrete times
set.seed(2)
stp2 <- stp(data.frame(cbind(runif(100), runif(100), round(runif(100) * 100))))
plot(stp2)


Run the code above in your browser using DataLab