##' 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,
...
)
X-coordinates
Y-coordinates
Radii
The number of vertices of the circle
Color of border
Color to render in circle
Whether the circles are added to another plot.
A logical value to determine whether to draw squares.
other things
This function is used to compute the locations of the circle border and draw multiple circles. It borrows the code from plotrix::draw.circle
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
}