| Line 9... |
Line 9... |
| 9 |
\description{
|
9 |
\description{
|
| 10 |
\code{path} draws a path whose vertices are
|
10 |
\code{path} draws a path whose vertices are
|
| 11 |
given in \code{x} and \code{y}.
|
11 |
given in \code{x} and \code{y}.
|
| 12 |
}
|
12 |
}
|
| 13 |
\usage{
|
13 |
\usage{
|
| 14 |
polypath(x, y = NULL,
|
14 |
polypath(x, y = NULL,
|
| 15 |
border = NULL, col = NA, lty = par("lty"),
|
15 |
border = NULL, col = NA, lty = par("lty"),
|
| 16 |
rule = "winding", \dots)
|
16 |
rule = "winding", \dots)
|
| 17 |
}
|
17 |
}
|
| 18 |
\arguments{
|
18 |
\arguments{
|
| 19 |
\item{x, y}{vectors containing the coordinates of the vertices
|
19 |
\item{x, y}{vectors containing the coordinates of the vertices
|
| Line 24... |
Line 24... |
| 24 |
\code{NA}.) If \code{density} is specified with a positive value
|
24 |
\code{NA}.) If \code{density} is specified with a positive value
|
| 25 |
this gives the color of the shading lines.}
|
25 |
this gives the color of the shading lines.}
|
| 26 |
\item{border}{the color to draw the border. The default, \code{NULL},
|
26 |
\item{border}{the color to draw the border. The default, \code{NULL},
|
| 27 |
means to use \code{\link{par}("fg")}. Use \code{border = NA} to
|
27 |
means to use \code{\link{par}("fg")}. Use \code{border = NA} to
|
| 28 |
omit borders.
|
28 |
omit borders.
|
| 29 |
|
29 |
|
| 30 |
For compatibility with S, \code{border} can also be logical, in
|
30 |
For compatibility with S, \code{border} can also be logical, in
|
| 31 |
which case \code{FALSE} is equivalent to \code{NA} (borders omitted)
|
31 |
which case \code{FALSE} is equivalent to \code{NA} (borders omitted)
|
| 32 |
and \code{TRUE} is equivalent to \code{NULL} (use the foreground colour),
|
32 |
and \code{TRUE} is equivalent to \code{NULL} (use the foreground colour),
|
| 33 |
}
|
33 |
}
|
| 34 |
\item{lty}{the line type to be used, as in \code{\link{par}}.}
|
34 |
\item{lty}{the line type to be used, as in \code{\link{par}}.}
|
| 35 |
\item{rule}{character value specifying the path fill mode: either
|
35 |
\item{rule}{character value specifying the path fill mode: either
|
| 36 |
\code{"winding"} or \code{"evenodd"}.}
|
36 |
\code{"winding"} or \code{"evenodd"}.}
|
| 37 |
\item{\dots}{\link{graphical parameters} such as \code{xpd}, \code{lend},
|
37 |
\item{\dots}{\link{graphical parameters} such as \code{xpd}, \code{lend},
|
| 38 |
\code{ljoin} and \code{lmitre} can be given as arguments.}
|
38 |
\code{ljoin} and \code{lmitre} can be given as arguments.}
|
| 39 |
}
|
39 |
}
|
| 40 |
\details{
|
40 |
\details{
|
| 41 |
The coordinates can be passed in a plotting structure
|
41 |
The coordinates can be passed in a plotting structure
|
| 42 |
(a list with \code{x} and \code{y} components), a two-column matrix,
|
42 |
(a list with \code{x} and \code{y} components), a two-column matrix,
|
| 43 |
\dots. See \code{\link{xy.coords}}.
|
43 |
\dots. See \code{\link{xy.coords}}.
|
| 44 |
|
44 |
|
| 45 |
It is assumed that the path is to be closed by joining the last point to
|
45 |
It is assumed that the path is to be closed by joining the last point to
|
| 46 |
the first point.
|
46 |
the first point.
|
| 47 |
|
47 |
|
| 48 |
The coordinates can contain missing values. The behaviour is similar
|
48 |
The coordinates can contain missing values. The behaviour is similar
|
| 49 |
to that of \code{\link{polygon}}, except that instead of breaking a
|
49 |
to that of \code{\link{polygon}}, except that instead of breaking a
|
| 50 |
polygon into several polygons, \code{NA} values break the path into
|
50 |
polygon into several polygons, \code{NA} values break the path into
|
| 51 |
several sub-paths (including closing the last point to the first point
|
51 |
several sub-paths (including closing the last point to the first point
|
| 52 |
in each sub-path). See the examples below.
|
52 |
in each sub-path). See the examples below.
|
| 53 |
|
53 |
|
| 54 |
The distinction between a path and a polygon is that the former
|
54 |
The distinction between a path and a polygon is that the former
|
| 55 |
can contain holes, as interpreted by the fill rule; these fill a region if
|
55 |
can contain holes, as interpreted by the fill rule; these fill a region if
|
| 56 |
the path border encircles it an odd or non-zero number of times,
|
56 |
the path border encircles it an odd or non-zero number of times,
|
| 57 |
respectively.
|
57 |
respectively.
|
| 58 |
|
58 |
|
| 59 |
Hatched shading (as implemented for \code{polygon()}) is not
|
59 |
Hatched shading (as implemented for \code{polygon()}) is not
|
| 60 |
(currently) supported.
|
60 |
(currently) supported.
|
| 61 |
|
61 |
|
| 62 |
Not all graphics devices support this function: for example
|
62 |
Not all graphics devices support this function: for example
|
| 63 |
\code{xfig} and \code{pictex} do not.
|
63 |
\code{xfig} and \code{pictex} do not.
|
| 64 |
}
|
64 |
}
|
| 65 |
\references{
|
65 |
\references{
|
| 66 |
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
|
66 |
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
|