plot.divchain | R Documentation |
Plot the dividing chain of a Dirichlet tessellation. The tessellation must have been created from a set of points having associated categorical “tags”. The dividing chain consists of those edges of Dirichlet tiles which separate points having different values of the given tags.
## S3 method for class 'divchain'
plot(x, add = FALSE, ...)
x |
An object of class “divchain”. See |
add |
Logical scalar. It |
... |
Graphical parameters such as |
None.
This function was created in response to a question asked
on stackoverflow.com
by a user named “Dan”.
divchain()
divchain.default()
divchain.deldir()
deldir()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.