annulusSeg | R Documentation |
This function adds an annulus to an existing plot. It is very similar to the annulus
function except that the annulus can be composed of one or more "segments" with different formatting (color, etc.).
annulusSeg(
x,
y,
inner,
outer,
deg = NULL,
n = 1000,
col = "black",
density = NULL,
angle = 45,
border = col,
force0 = FALSE,
...
)
x |
Numeric, x-coordinate of center of annulus. |
y |
Numeric, y-coordinate of center of annulus. |
inner |
Numeric vector, inner radius of each segment. |
outer |
Numeric vector, outer radius of each segment. |
deg |
This is either:
|
n |
Integer, number of vertices used to approximate a circle. |
col |
Character or integer vector, colors used to fill segments. |
density |
Numeric or numeric vector, the density of shading lines, in lines per inch. The default value of |
angle |
Numeric or numeric vector, the slope of shading lines, given as an angle in degrees (counter-clockwise). |
border |
Character or integer vector, color used to draw segment borders. |
force0 |
Logical, if |
... |
Arguments to send to |
Nothing (side-effect is to add a segmented annulus to an existing plot).
annulus
, polygon
inner <- c(0.2, 0.4, 0.7)
outer <- c(0.5, 0.6, 0.71)
col <- c('red', 'blue', 'green')
par(pty='s')
plot(0, 0, xlim=c(-1, 1), ylim=c(-1, 1), col='white')
annulusSeg(x=0, y=0, inner, outer, col=col, border='black')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.