-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpolygon.Rd
More file actions
42 lines (39 loc) · 1.35 KB
/
polygon.Rd
File metadata and controls
42 lines (39 loc) · 1.35 KB
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
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/polygon.R
\name{polygon}
\alias{polygon}
\title{gsplot polygon}
\usage{
polygon(object, ...)
}
\arguments{
\item{object}{gsplot object}
\item{\dots}{Further graphical parameters may also be supplied as arguments. See 'Details'.}
}
\description{
Plot a polygon by specifying vertices. See \code{\link[graphics]{polygon}} for more details.
}
\details{
Additional graphical parameter inputs:
\itemize{
\item{\code{x}} {vector specifying the x values of the vertices}
\item{\code{y}} {vector specifying the y values of the vertices}
\item{\code{density}} {density of shading lines (lines per inch), NULL means no shading, NA suppresses shading and allows color fill}
\item{\code{angle}} {angle of shading lines (degrees)}
\item{\code{col}} {shade or fill color(s), NA means no fill (transparent)}
\item{\code{border}} {color of border, NA means no border, TRUE indicates the same color as shading lines}
\item{\code{lty}} {line type for borders and shading}
\item{\code{lwd}} {line width for borders and shading}
}
}
\examples{
gs <- gsplot() \%>\%
polygon(x=c(1,2,5), y=c(1,4,0.5),
density=10, col="darkgreen")
gs
gs <- gsplot() \%>\%
polygon(x=c(2,6.5,12,10.5,14,9,6.5,5,0,3.5),
y=c(0,2.5,0,5,8.5,9,14,9,8.5,5),
density=NA, col="blue", border=NA)
gs
}