This geom allows you to draw the lissajous curve.
stat_lissajous(mapping = NULL, data = NULL, geom = "lissajous", position = "identity", n_points = 360, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...) geom_lissajous(mapping = NULL, data = NULL, stat = "lissajous", position = "identity", n_points = 360, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...)
mapping | Set of aesthetic mappings created by |
---|---|
data | The data to be displayed in this layer. There are three options: If A A |
geom | The geometric object to use display the data |
position | Position adjustment, either as a string, or the result of a call to a position adjustment function. |
n_points | The number of points to sample along the curve. |
na.rm | If |
show.legend | logical. Should this layer be included in the legends?
|
inherit.aes | If |
... | Other arguments passed on to |
stat | The statistical transformation to use on the data for this layer, as a string. |
The curve follows the the parameterized form
$$x = sin(a\theta + \delta)$$ $$y = sin(b\theta)$$
these curves are closed when the radion \(a / b\) is rational. delta have been scaled to be in the interval [0, 1].
geom_arc understand the following aesthetics (required aesthetics are in bold):
- **a** - **b** - **delta** - x0 - y0 - xscale - yscale - rotation - color - fill - size - linetype - alpha - lineend
The coordinates for the points along the rose curve
https://en.wikipedia.org/wiki/Lissajous_curve
ggplot() + geom_lissajous(aes(a = 5, b = 4, delta = 2))ggplot() + geom_lissajous(aes(a = 2, b = 3, delta = 1))# Scaling shapes ggplot() + geom_lissajous(aes(a = 2, b = 3, delta = 1, xscale = 5, yscale = 2))# Rotation shapes ggplot() + geom_lissajous(aes(a = 2, b = 3, delta = 1, rotation = pi / 4))