annulus | R Documentation |
This function adds an annulus to an existing plot.
annulus(
x,
y,
inner,
outer,
deg = c(0, 360),
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, inner radius. |
outer |
Numeric, outer radius. |
deg |
Two-element numeric list, degrees across which to draw the annulus (0 is "north" and increasing values go clockwise). Default is |
n |
Integer, number of vertices used to approximate a circle. |
col |
Character or integer, color used to fill annulus. Note that if |
density |
Numeric, the density of shading lines, in lines per inch. The default value of |
angle |
Numeric, the slope of shading lines, given as an angle in degrees (counter-clockwise). |
border |
Character or integer, color used to draw annulus border. Note that if |
force0 |
Logical, if |
... |
Arguments to send to |
Nothing (side-effect is to add an annulus to an existing plot).
annulusSeg
, polygon
par(pty='s')
plot(0, 0, xlim=c(-1, 1), ylim=c(-1, 1))
annulus(x=0.3, y=-0.2, inner=0.3, outer=1, col='cornflowerblue')
annulus(x=-0.3, y=0.2, inner=0.2, outer=0.4, deg=c(0, 135), border='red')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.