https://github.com/cran/cccd
Tip revision: de4ce40da7a3b119ee4d19055a910ee9a4ad2a63 authored by David J. Marchette on 08 April 2022, 11:22:29 UTC
version 1.6
version 1.6
Tip revision: de4ce40
circle.R
draw.circle <- function(x,y,radius,border=NULL,col=NA,nv=100,...)
{
angle.inc <- 2*pi/nv
theta <- seq(0,2*pi-angle.inc,by=angle.inc)
if(length(radius)<length(x)) radius <- rep(radius,length.out=length(x))
if(length(col)<length(x)) col <- rep(col,length.out=length(x))
if(!is.null(border))
if(length(border)<length(x)) border <- rep(border,length.out=length(x))
for(i in 1:length(x)){
polygon(radius[i]*cos(theta)+x[i],radius[i]*sin(theta)+y[i],
border=border[i],col=col[i],...)
}
}