Learn R Programming

spatstat.linnet (version 3.2-2)

persp.linim: Perspective View of Pixel Image on a Linear Network

Description

Given a pixel image on a linear network, generate a perspective view.

Usage

# S3 method for linim
persp(x, ..., main,
                       grid = TRUE, ngrid = 10,
                       col.grid = "grey", col.base = "white",
                       neg.args=list(), warncross=FALSE)

Value

(Invisibly) the perspective transformation matrix, as described in the help for persp.default.

Arguments

x

Pixel image on a linear network (object of class "linim").

...

Arguments passed to persp.default to control the perspective view, or passed to segments or polygon to control the appearance of the vertical panes.

main

Main title for the plot.

grid

Logical value indicating whether to draw a rectangular grid at height zero, to assist the perception of perspective.

ngrid

Number of grid lines to draw, if grid=TRUE.

col.grid

Colour of grid lines, if grid=TRUE.

col.base

Colour of base plane, if grid=TRUE.

neg.args

Optional list of arguments passed to polygon when displaying negative values of the function.

warncross

Logical value indicating whether to issue a warning if two segments of the network cross each other (which causes difficulty for the algorithm).

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Greg McSwiggan.

Details

The pixel values are interpreted as the spatially-varying height of a vertical surface erected on each segment of the linear network. These surfaces are drawn in perspective view.

This style of plot is often attributed to Okabe and Sugihara (2012).

References

Okabe, A. and Sugihara, K. (2012) Spatial Analysis Along Networks. John Wiley and Sons, New York.

See Also

persp.linfun

Examples

Run this code
  if(interactive()) {
    Z <- density(chicago, 100)
  } else {
    X <- runiflpp(10, simplenet)
    Z <- density(X, 0.1)
  }
  persp(Z, theta=30, phi=20)

Run the code above in your browser using DataLab