# NOT RUN {
# Basic usage
ggplot() +
geom_ellipse(aes(x0 = 0, y0 = 0, a = 10, b = 3, angle = 0)) +
coord_fixed()
# Rotation
# Note that it expects radians and rotates the ellipse counter-clockwise
ggplot() +
geom_ellipse(aes(x0 = 0, y0 = 0, a = 10, b = 3, angle = pi / 4)) +
coord_fixed()
# Draw a super ellipse
ggplot() +
geom_ellipse(aes(x0 = 0, y0 = 0, a = 6, b = 3, angle = -pi / 3, m1 = 3)) +
coord_fixed()
# }
Run the code above in your browser using DataCamp Workspace