plotBoundedCell2D | R Documentation |
Plot a bounded Voronoï 2D cell.
plotBoundedCell2D(
cell,
border = "black",
color = NA,
check.bounded = TRUE,
...
)
cell |
a bounded Voronoï 2D cell |
border |
color of the borders of the cell; |
color |
color of the cell; |
check.bounded |
Boolean, whether to check that the cell is bounded;
set to |
... |
graphical parameters for the borders |
No value, this function just plots the cell (more precisely, it adds the plot of the cell to the current plot).
library(tessellation)
centricSquare <- rbind(
c(-1, 1), c(1, 1), c(1, -1), c(-1, -1), c(0, 0)
)
d <- delaunay(centricSquare)
v <- voronoi(d)
cell5 <- v[[5]]
isBoundedCell(cell5) # TRUE
plot(centricSquare, type = "n", asp = 1, xlab = "x", ylab = "y")
plotBoundedCell2D(cell5, color = "pink")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.