plotCSedges.tri: The plot of the edges of the underlying or reflexivity graphs...

View source: R/CentSimUG2D.R

plotCSedges.triR Documentation

The plot of the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data - one triangle case

Description

Plots the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) whose vertices are the data points, Xp and the triangle tri. CS proximity regions are constructed with respect to the triangle tri with expansion parameter t > 0, i.e., edges may exist only for Xp points inside the triangle tri.

Edge regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri; default is M=(1,1,1), i.e., the center of mass of tri. With any interior center M, the edge regions are constructed using the extensions of the lines combining vertices with M.

See also (\insertCiteceyhan:Phd-thesis,ceyhan:stamet2016;textualpcds.ugraph).

Usage

plotCSedges.tri(
  Xp,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  edge.reg = FALSE,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

A positive real number which serves as the expansion parameter in CS proximity region.

M

A 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the triangle tri; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

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

edge.reg

A logical argument to add edge regions to the plot, default is edge.reg=FALSE.

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the CS-PCD whose vertices are the points in data set Xp and the triangle tri

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

plotCSedges, plotASedges.tri, plotPEedges.tri, and plotCSarcs.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
t<-1.5
plotCSedges.tri(Xp,Tr,t,M,edge.reg = TRUE,xlab="",ylab="")
plotCSedges.tri(Xp,Tr,t,M,ugraph="r",edge.reg = TRUE,xlab="",ylab="")

#can add vertex labels and text to the figure (with edge regions)
Ds<-pcds::prj.cent2edges(Tr,M); cent.name="M"

txt<-rbind(Tr,M,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.04,-0.03,-.01)
yc<-txt[,2]+c(.02,.02,.02,.07,.02,.04,-.06)
txt.str<-c("A","B","C",cent.name,"D1","D2","D3")
text(xc,yc,txt.str)
#}


pcds.ugraph documentation built on May 29, 2024, 10:39 a.m.