##' From https://github.com/chxy/cartogram/blob/master/R/dorling.R Not exported here, but needed for aec_carto_f

circle(
  xvec,
  yvec,
  rvec,
  vertex = 100,
  border = 1,
  col = NULL,
  add = TRUE,
  square = FALSE,
  ...
)

Arguments

xvec

X-coordinates

yvec

Y-coordinates

rvec

Radii

vertex

The number of vertices of the circle

border

Color of border

col

Color to render in circle

add

Whether the circles are added to another plot.

square

A logical value to determine whether to draw squares.

...

other things

Details

This function is used to compute the locations of the circle border and draw multiple circles. It borrows the code from plotrix::draw.circle

Examples

if (FALSE) {
x=y=1:5
r=5:1/5
circle(x,y,r,add=FALSE,asp=1)
circle(x,y,r,vertex=6,add=TRUE)  # hexagon
circle(x,y,r,vertex=4,add=TRUE)  # diamond
circle(x,y,r,square=TRUE,add=TRUE)  # square
}