Learn R Programming

pcds (version 0.1.2)

plotIntervals: The plot of the subintervals based on Yp points together with Xp points

Description

Plots the Xp points and the intervals based on Yp points points.

Usage

plotIntervals(
  Xp,
  Yp,
  main = "",
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

Xp

A set of 1D points whose scatter-plot is provided.

Yp

A set of 1D points which constitute the end points of the intervals which partition the real line.

main

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

xlab, ylab

Titles for the \(x\) and \(y\) axes, respectively (default="" 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

Plot of the intervals based on Yp points and also scatter plot of Xp points

See Also

plotPEregsMI and plotDeltri

Examples

Run this code
# NOT RUN {
a<-0; b<-10;

#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)
Xp<-runif(nx,a,b)
Yp<-runif(ny,a,b)

plotIntervals(Xp,Yp,xlab="",ylab="")
plotIntervals(Xp,Yp+10,xlab="",ylab="")

# }

Run the code above in your browser using DataLab