Learn R Programming

pcds (version 0.1.4)

plotPEarcs1D: The plot of the arcs of Proportional Edge Proximity Catch Digraphs (PE-PCDs) for 1D data (vertices jittered along \(y\)-coordinate) - multiple interval case

Description

Plots the arcs of PE-PCD whose vertices are the 1D points, Xp. PE proximity regions are constructed with expansion parameter \(r \ge 1\) and centrality parameter \(c \in (0,1)\) and the intervals are based on Yp points (i.e. the intervalization is based on Yp points). That is, data set Xp constitutes the vertices of the digraph and Yp determines the end points of the intervals.

For better visualization, a uniform jitter from \(U(-Jit,Jit)\) (default for \(Jit=.1\)) is added to the \(y\)-direction where Jit equals to the range of Xp and Yp multiplied by Jit with default for \(Jit=.1\)). centers is a logical argument, if TRUE, plot includes the centers of the intervals as vertical lines in the plot, else centers of the intervals are not plotted.

See also (ceyhan:metrika-2012;textualpcds).

Usage

plotPEarcs1D(
  Xp,
  Yp,
  r,
  c,
  Jit = 0.1,
  main = "",
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  centers = FALSE,
  ...
)

Value

A plot of the arcs of PE-PCD whose vertices are the 1D data set Xp in which vertices are jittered along \(y\)-axis for better visualization.

Arguments

Xp

A vector of 1D points constituting the vertices of the PE-PCD.

Yp

A vector of 1D points constituting the end points of the intervals.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \(\ge 1\).

c

A positive real number in \((0,1)\) parameterizing the center inside int\(=(a,b)\). For the interval, int\(=(a,b)\), the parameterized center is \(M_c=a+c(b-a)\).

Jit

A positive real number that determines the amount of jitter along the \(y\)-axis, default=0.1 and Xp points are jittered according to \(U(-Jit,Jit)\) distribution along the \(y\)-axis where Jit equals to the range of Xp and Yp multiplied by Jit).

main

Title of the main heading of the plot.

xlab, ylab

Titles of the \(x\) and \(y\) axes in the plot (default="" for both).

xlim, ylim

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

centers

A logical argument, if TRUE, plot includes the centers of the intervals as vertical lines in the plot, else centers of the intervals are not plotted.

...

Additional plot parameters.

Author

Elvan Ceyhan

References

See Also

plotCSarcs1D

Examples

Run this code
r<-2
c<-.4
a<-0; b<-10; int<-c(a,b)

#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
xr<-range(a,b)
xf<-(xr[2]-xr[1])*.1

Xp<-runif(nx,a-xf,b+xf)
Yp<-runif(ny,a,b)

Xlim=range(Xp,Yp)
Ylim=c(-.2,.2)

jit<-.1

plotPEarcs1D(Xp,Yp,r,c,jit,xlab="",ylab="",xlim=Xlim,ylim=Ylim)

set.seed(1)
plotPEarcs1D(Xp,Yp,r=1.5,c=.3,jit,main="r=1.5, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotPEarcs1D(Xp,Yp,r=2,c=.3,jit,main="r=2, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotPEarcs1D(Xp,Yp,r=1.5,c=.5,jit,main="r=1.5, c=.5",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotPEarcs1D(Xp,Yp,r=2,c=.5,jit,main="r=2, c=.5",xlab="",ylab="",centers=TRUE)

Run the code above in your browser using DataLab