plotDelaunay.tri: The scatterplot of points from one class and plot of the...

View source: R/AuxDelaunay.R

plotDelaunay.triR Documentation

The scatterplot of points from one class and plot of the Delaunay triangulation of the other class

Description

Plots the scatter plot of Xp points together with the Delaunay triangles based on the Yp points. Both sets of points are of 2D.

See (\insertCiteokabe:2000,ceyhan:comp-geo-2010,sinclair:2016;textualpcds) for more on Delaunay triangulation and the corresponding algorithm.

Usage

plotDelaunay.tri(
  Xp,
  Yp,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

Xp

A set of 2D points whose scatterplot is to be plotted.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both)

...

Additional plot parameters.

Value

A scatterplot of Xp points and the Delaunay triangulation of Yp points.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

plot.triSht in interp package

Examples

## Not run: 
nx<-20; ny<-5;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
#try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1))

plotDelaunay.tri(Xp,Yp,xlab="",ylab="",main="X points and Delaunay Triangulation of Y points")

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.