ellipse: draw circles and ellipses

Usage Arguments Value Examples

Usage

1
2
3
4
5
6
7
circle(x=0, y=0, radius=1, sx, sy, ...)
ellipse(x=0, y=0, sx=1, sy=1, rho=0, fine=0.005, center=0.1,
  show=TRUE, add=TRUE, xlab, ylab, bty, xaxt, yaxt, type, lty, pty, ...)
norm.ellipse(x, y, level=0.05,
  radius=sqrt(qchisq(1-level,2)), ...)
panel.ellipse(x=0, y=0, sx=1, sy=1, rho=0, fine=0.005, center=0.1,
  xlab, ylab, bty, xaxt, yaxt, type, lty, pty, ...)

Arguments

x,y

center of circle or ellipse before orienting

radius

length of radius (positive)

sx,sy,rho

standardizing units for x,y (positive)and correlation between x and y (between -1 and 1)

fine

fineness of arcs for drawing (between 0 and 1)

center

if positive, fraction of radius for main axes

show

plot ellipse or circle if TRUE

add

add to existing plot if TRUE

level

probability level (default 0.05)

xlab,ylab,xaxt,yaxt,type,lty,pty,bty

plot parameters

...

other plot parameters (many are set if add=F)

Value

list of dataframes containing ellipse or circle arc(s)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# circle with unit radius
circle()
# return coordinates of arc for ellipse
ellipse(sx=2,sy=3,rho=.5,show=FALSE)
# ellipse rotated 45 degrees, centered at (1,2)
ellipse(xo=1,yo=2,sx=.25,sy=.5,orient=pi/2)
# ellipse at (1,2), but then rotated 45 degrees
ellipse(x=1,y=2,sx=.25,sy=.5,orient=pi/2)
## Not run: 
# 95% contour for bivariate normal from data (x,y)
norm.ellipse(x,y)

## End(Not run)

byandell/pda documentation built on May 13, 2019, 9:27 a.m.