R/plotCircle.R

Defines functions plotCircle

plotCircle <-
function(xlab="",ylab="",main="",axis.lwd=3,circle.lwd=3,circle.col="#00000040",asp=1){

	j <- seq(pi/128,2*pi,by=pi/128)
	coords <- cbind(cos(j),sin(j))
	coords <- rbind(coords,coords[1,])
	
	#an override because I could not trace the real problem...
	constraints <- list(minx=-1.1,miny=-1.1,maxx=1.1,maxy=1.1)
	axis_list <- determineAxesPosition(constraints)

	plot(c(0,0),c(0,0),type="n",col="white",axes=FALSE,xlab=xlab,ylab=ylab,ylim=c(constraints$miny,constraints$maxy),xlim=c(constraints$minx,constraints$maxx),main=main,asp=asp)	
	makeAxes(axis_list,axis.lwd)	
	points(coords,col=circle.col,type='l',lwd=circle.lwd)
	#points(0,0,col="black",pch=20) ###what is this?
}

Try the prettyGraphs package in your browser

Any scripts or data that you put into this service are public.

prettyGraphs documentation built on May 1, 2019, 9:25 p.m.