circles.plot: Plot circles

Description Usage Arguments Author(s) See Also Examples

View source: R/circles.plot.R

Description

plot.circles creates a plot with one or more circles (or adds them to an existing plot).

Usage

1
2
circles.plot(coords, r, add = FALSE, ..., nv = 100, border = NULL,
  ccol = NA, clty = 1, density = NULL, angle = 45, clwd = 1)

Arguments

coords

A matrix of coordinates with the centroid of each circle.

r

A vector containing the radii of the circles. The length of r must equal the number of rows of coords.

add

A logical value indicating whether the circles should be added to an existing plot. Default is FALSE.

...

Additional arguments passed to the plot function.

nv

Number of vertices to draw the circle.

border

A vector with the desired border of each circle. The length should either be 1 (in which case the border is repeated for all circles) or should match the number of rows of coords.

ccol

A vector with the desired color of each circle. The length should either be 1 (in which case the color is repeated for all circles) or should match the number of rows of coords.

clty

A vector with the desired line type of each circle. The length should either be 1 (in which case the line type is repeated for all circles) or should match the number of rows of coords.

density

A vector with the density for a patterned fill. The length should either be 1 (in which case the density is repeated for all circles) or should match the number of rows of coords. See polygon

angle

A vector with the angle of a patterned fill. The length should either be 1 (in which case the angle is repeated for all circles) or should match the number of rows of coords. See polygon

clwd

A vector with the desired line width of each circle. The length should either be 1 (in which case the line width is repeated for all circles) or should match the number of rows of coords.

Author(s)

Joshua French

See Also

draw.circle, polygon

Examples

1
2
3
4
5
6
7
8
co = cbind(c(1, 2, 5, 6, 9), c(1, 2, 5, 6, 9))
r = c(1.25, 1.25, 1.25, 1.25, 1.25)
# draw circles
circles.plot(co, r)
circles.plot(co, r, 
   ccol = c("blue", "blue", "orange", "orange", "brown"),
   density = c(10, 20, 30, 40, 50),
   angle = c(45, 135, 45, 136, 90))

smacpod documentation built on May 14, 2018, 5:07 p.m.