plotarcs: plot a collection of arcs

View source: R/arcs.R

plotarcsR Documentation

plot a collection of arcs

Description

The function plotarcs() plots a circle in the plane, with the given arcs overlayed with a thicker line.

Usage

plotarcs( arcmat, labels=FALSE, main=NULL, margintext=NA, rad=1, 
                        lwd=3, pch=20, cex=1.5, add=FALSE, ...  )

Arguments

arcmat

an Nx2 matrix with an arc definition in each row; so the total number of arcs is N. The 1st number in the row is the center of the arc, and the 2nd number is the length of the arc; both in radians.
The length can be 0 or 2\pi, defining the empty arc and the full circle respectively. For these improper arcs, there must be only 1 row, and the center is ignored. For improper arcs the endpoints are not drawn.

labels

if TRUE then add a text label near the center of each arc

main

Text to put above the plot, passed to title(). If main=NULL then a suitable descriptive title is constructed.

margintext

if not NA then add this text under the x-axis

rad

radius of the arcs, which are centered at (0,0). A smaller radius can be used with add=TRUE to avoid overlap with the first set of arcs.

lwd

line width of the arcs. The default lwd=3 makes the arcs bolder to distinguish them from the underlying circle, which is drawn with lwd=1. Iflwd=NA or lwd<0 then drawing is skipped and only the endpoints are drawn.

pch

symbol for the endpoints, see points()

cex

expansion factor for the endpoints, see points()

add

when add=TRUE the arcs are added to an existing plot

...

extra arguments for the both the arcs and their endpoints, passed to both lines() and points(). For example, the color col.

Value

plotarcs() returns TRUE or FALSE.


polarzonoid documentation built on June 13, 2025, 9:08 a.m.