ellipse | R Documentation |
Draws an ellipse with independent major and minor radii.
ellipse(a, b = a, x = 0, y = 0, theta = 0, sep = 1, ...)
a |
A numeric. Radius along the major axis. |
b |
A numeric. Radius along the minor axis. |
x |
A numeric. The horizontal center of the ellipse. |
y |
A numeric. The vertical center of the ellipse. |
theta |
A numeric. The obliqueness of the ellipse in degree. |
sep |
A numeric. The interval of edge drawing in degree.
By default |
... |
Other arguments passed to |
Drawing of circles can be done by the combination of
coordinate calculation and graphics::polygon()
function.
ellipse()
further provides an easy way to draw an ellipse (oval circle)
with independent two radii along its major and minor axes.
A list. The first and second element respectively corresponds to x- and y-coodinates of the ellipse's edge.
plot(0, 0, type = "n", bty = "l",
xlab = "x", ylab = "y",
xlim = c(0, 100), ylim = c(0, 100))
ellipse(25, 10, 30, 20)
text(30, 20, "ellipse(25, 10, 30, 20)")
ellipse(35, 20, 60, 70, 30,
lwd = 3, col = "gray")
text(60, 70, "ellipse(35, 20, 60, 70, 30)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.