circle | R Documentation |
##' 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,
...
)
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 |
This function is used to compute the locations of the circle border and draw multiple circles. It borrows the code from plotrix::draw.circle
## Not run:
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
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.