File: draw.ellipse.Rd

package info (click to toggle)
r-cran-plotrix 3.2-6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,136 kB
  • sloc: makefile: 3
file content (64 lines) | stat: -rwxr-xr-x 2,049 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
\name{draw.ellipse}
\alias{draw.ellipse}
\title{Draw ellipse}
\description{Draws ellipses on an existing plot.}
\usage{
draw.ellipse(x, y, a = 1, b = 1, angle = 0, segment = c(0, 360), 
arc.only = TRUE, deg = TRUE, nv = 100, border = NULL, 
col = NA, lty = 1, lwd = 1, ...)
}
\arguments{
  \item{x}{
A vector or a matrix (if \code{y} is missing).}
  \item{y}{
A vector, can be missing.
}
  \item{a,b}{
Vectors, radii of the ellypses along the two axes in user units.
}
  \item{angle}{
Angle of rotation in degrees (if \code{deg=TRUE}) or in radians (if \code{deg=FALSE}).
}
  \item{segment}{
Start and endpoints of arc in degrees (if \code{deg=TRUE}) or in radians (if \code{deg=FALSE}).
}
  \item{arc.only}{
Logical, if \code{segmen} the full ellipse is not drawn, radii from the
ends of the arc are drawn to form a sector (see Examples).
}
  \item{deg}{
Logical, if angles are given in degrees (\code{TRUE}) or radians.
}
  \item{nv}{
Number of vertices to draw the ellipses.
}
  \item{border}{
Color to use for drawing the circumference.
}
  \item{col}{
Color to use for filling the circle.
}
  \item{lty}{
Line type for the circumference.
}
  \item{lwd}{
Line width for the circumference.
}
  \item{\dots}{
Additional arguments passed to \code{\link{polygon}}.
}
}
\value{
Draw ellipses as a side effect. Returns \code{NULL} invisibly.
}
\author{Peter Solymos <solymos@ualberta.ca>}
\seealso{\link{polygon}}
\examples{
plot(c(0,10), c(0,10), type="n", main="test draw.ellipse")
draw.ellipse(c(3,7), c(8,8), c(0.5,1), c(1,0.5), col=c(2,4), angle=c(45,0), segment=rbind(c(0,45),c(45,360)))
draw.ellipse(c(3,7), c(6,6), c(0.5,1), c(1,0.5), col=c(2,4), angle=c(45,0), segment=rbind(c(0,45),c(45,360)), arc.only=FALSE)
draw.ellipse(c(3,7), c(4,4), c(0.5,1), c(1,0.5), border=c(2,4), angle=c(45,0), segment=rbind(c(0,45),c(45,360)), arc.only=FALSE)
draw.ellipse(c(3,7), c(2,2), c(0.5,1), c(1,0.5), border=1, angle=c(45,0), lty=3)
draw.ellipse(c(3,7), c(2,2), c(0.5,1), c(1,0.5), border=c(5,3), angle=c(45,0), nv=c(3,4), lty=2, lwd=2)
}
\keyword{misc}