Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.divchain

Plot a dividing chain.


Description

Plot the dividing chain of a Dirchlet tesselation. The tessellation must have been created from a set of points having associated categorical “weights”. The dividing chain consists of those edges of Dirichlet tiles which separate points having different values of the given weights.

Usage

## S3 method for class 'divchain'
plot(x, add = FALSE, ...)

Arguments

x

An object of class “divchain”. See divchain.deldir() for details.

add

Logical scalar. It add=TRUE the plot of the dividing chain is added to an existing plot.

...

Graphical parameters such as main, xlab, col.main, col.lab. In particular if bty is supplied (as a value other than n) a “box” will be drawn around the plot that is formed when add=FALSE. Also a non-standard graphical parameter boxcol may be supplied which will be taken to be the colour with which the box is drawn. If a col argument is supplied, this determines the colour for plotting the segments constituting the dividing chain.

Value

None.

Note

This function was created in response to a question asked on stackoverflow.com by a user named “Dan”.

Author(s)

See Also

Examples

set.seed(42)
   x   <- runif(50)
   y   <- runif(50)
   z   <- factor(kmeans(cbind(x,y),centers=4)$cluster)
   dc  <- divchain(x,y,z,rw=c(0,1,0,1))
   plot(dc,lwd=2,col="blue",bty="o")

deldir

Delaunay Triangulation and Dirichlet (Voronoi) Tessellation

v0.2-10
GPL (>= 2)
Authors
Rolf Turner
Initial release
2021-02-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.