plot.delvor: Plot the Voronoi diagram and Delaunay traingulation

plot.delvorR Documentation

Plot the Voronoi diagram and Delaunay traingulation

Description

This function returns a plot of the Voronoi diagram and Delaunay traingulation.

Usage

## S3 method for class 'delvor'
plot(x, add = FALSE, wlines = c("both", "del", "vor"),
	wpoints = TRUE, number = FALSE, col = NULL, 
	xlim = NULL, ylim = NULL, ...)

Arguments

x

An object of class "delvor" as constructed by the function delvor.

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 par).

See Also

delvor.

Examples

## 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)

alphahull documentation built on June 16, 2022, 5:10 p.m.