Learn R Programming

stopp (version 0.2.3)

plot.stpm: Plot a stpm object

Description

This function plots the marked point pattern stored in the stpm object given in input, in a three panel plot representing the 3Dplot of the coordinates, and the mark values.

Usage

# S3 method for stpm
plot(x, ...)

Arguments

x

An object of class stpm

...

additional unused argument

Author

Nicoletta D'Angelo

See Also

stppm

Examples

Run this code


df <- data.frame(cbind(runif(100), runif(100), runif(100), rpois(100, 15),
rpois(100, 30)))

stpm1 <- stpm(df)

plot(stpm1)

## Categorical marks

dfA <- data.frame(x = runif(100), y = runif(100), t = runif(100), 
                  m1 = rnorm(100), m2 = rep(c("C"), times = 100))
dfB <- data.frame(x = runif(50), y = runif(50), t = runif(50), 
                  m1 = rnorm(25), m2 = rep(c("D"), times = 50))

stpm2 <- stpm(rbind(dfA, dfB), names = c("continuous", "dichotomous"))

plot(stpm2)

Run the code above in your browser using DataLab