arc: Plot an arc on an existing plot

View source: R/arc.r

arcR Documentation

Plot an arc on an existing plot

Description

This function adds an arc to an existing plot.

Usage

arc(x, y, radius, deg, n = 1000L, ...)

Arguments

x

Numeric, x-coordinate of center of arc.

y

Numeric, y-coordinate of center of arc.

radius

Numeric, radius of arc.

deg

Two-element numeric vector, degrees across which to draw arc (0 is up, 90 right, 180 down, and 270 left).

...

Arguments to send to lines.

Value

Nothing (side-effect is to add an arc to an existing plot).

See Also

lines

Examples

par(pty='s')
plot(0, 0, xlim=c(-1, 1), ylim=c(-1, 1))
arc(x=0.3, y=-0.2, radius=0.6, deg=c(0, 135), col='cornflowerblue')
arc(x=0, y=0, radius=0.3, deg=c(90, 360), col='red', lty='dotted')
arc(x=1, y=0, radius=2, deg=c(225, 325), col='green', lwd=2)

adamlilith/legendary documentation built on July 28, 2023, 8:13 p.m.