plot.delvor {alphahull} | R Documentation |
This function returns a plot of the Voronoi diagram and Delaunay traingulation.
## S3 method for class 'delvor'
plot(x, add = FALSE, wlines = c("both", "del", "vor"),
wpoints = TRUE, number = FALSE, col = NULL,
xlim = NULL, ylim = NULL, ...)
x |
An object of class |
add |
Logical, if TRUE add to a current plot. |
wlines |
"Which lines?". I.e. should the Delaunay triangulation be plotted (wlines='del'), should the Voronoi diagram be plotted (wlines='vor'), or should both be plotted (wlines='both', the default)? |
wpoints |
Logical, indicates if sample points should be plotted. |
number |
Logical, defaulting to FALSE; if TRUE then the points plotted will be labelled with their index numbers. |
col |
The colour numbers for plotting the data points, Delaunay triangulation, Voronoi diagram, and the point numbers, in that order; defaults to c(1,1,1,1). If fewer than four numbers are given, they are recycled. (If more than four numbers are given, the redundant ones are ignored.) |
xlim |
The limits on the x-axis. |
ylim |
The limits on the y-axis. |
... |
Arguments to be passed to methods, such as graphical parameters (see |
## Not run:
# Random sample in the unit square
x <- matrix(runif(100), nc = 2)
# Delaunay triangulation and Voronoi diagram
delvor.obj <- delvor(x)
# Plot Voronoi diagram and Delaunay triangulation
plot(delvor.obj)
## End(Not run)