drawcircle | R Documentation |
draws a circle with vertical alignment at bottom
drawcircle(x, y, rad, npoints = 70, border = NA, ...)
x |
numeric, x location |
y |
numeric, y location |
rad |
numeric, radius |
npoints |
integer, number of points along the circumference |
border |
color for circumference, by default omitted (i.e. |
... |
other graphical parameters, e.g. |
adds to current plot
plot(0, 0, asp=1, xlim=c(-2,2), ylim=c(-2,2), "n") # by radius drawcircle(-2, -2, 2, col="red") drawcircle(-2, -2, 1, col="blue") drawcircle(-2, -2, 0.5, col="gold") # by area drawcircle(2, -2, sqrt(2*2*pi/pi), col="red") drawcircle(2, -2, sqrt(2*1*pi/pi), col="blue") drawcircle(2, -2, sqrt(2*0.5*pi/pi), col="gold")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.