draw.arc {plotrix}R Documentation

Draw arc

Description

Draw one or more arcs using classic graphics.

Usage

 draw.arc(x=1,y=NULL,radius=1,angle1=deg1*pi/180,angle2=deg2*pi/180, 
  deg1=0,deg2=45,n=35,col=1,...)

Arguments

x x coordinate of center. Scalar or vector.
y y coordinate of center. Scalar or vector.
radius radius. Scalar or vector.
angle1 Starting angle in radians. Scalar or vector.
angle2 Ending angle in radians. Scalar or vector.
deg1 Starting angle in degrees. Scalar or vector.
deg2 Ending angle in degrees. Scalar or vector.
n Number of polygons to use to approximate the arc.
col Arc colors.
... Other arguments passed to segments. Vectorization is not supported for these.

Details

Draws one or more arcs from angle1 to angle2. If angle1 is numerically greater than angle2, then the angles are swapped.

Value

Returns a matrix of expanded arguments invisibly.

Author(s)

Gabor Grothendieck

Examples

plot(1:10, asp = 1,main="Test draw.arc")
draw.arc(5, 5, 1:10/10, deg2 = 1:10*10, col = "blue")
draw.arc(8, 8, 1:10/10, deg2 = 1:10*10, col = 1:10)

[Package plotrix version 2.5-5 Index]