ellipse | R Documentation |
Generate an ellipse from center coordinates, major and minor axis radii, and angle rotation.
ellipse(x = 0, y = 0, sx = 2, sy = 1, rotation = 0, n = 100)
st_ellipse(geometry, sx, sy, rotation = 0, n = 100)
x |
longitude of center point |
y |
latitude of center point |
sx |
radius of major axis |
sy |
radius of minor axis |
rotation |
the degree of rotation of the ellipse |
n |
the number of coordinates to generate for the ellipse |
geometry |
an sf |
ellipse()
returns a matrix of point locations defining the ellipse. st_ellipse()
returns an sf object with LINE geography of the ellipse. Increasing n increases the number of points generated to define the ellipse shape.
ellipse()
function is adapted from ggVennDiagram
.
an sf object
ellipse(n = 10)
st_ellipse(sf::st_point(c(0, 0)), sx = 10, sy = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.