sine | R Documentation |
This function creates a path from the starting point (x_start, y_start) to the ending point (x_end, y_end) with the sine shape.
sine(x_start = 0, x_end = 1, y_start = 0, y_end = 1, n = 100)
x_start |
The x-coordinate of the starting point. |
x_end |
The x-coordinate of the ending point. |
y_start |
The y-coordinate of the starting point. |
y_end |
The y-coordinate of the ending point. |
n |
A numeric value that controls the number of points between starting and ending points. |
Return a path in a data frame format
Brunson JC (2020). “ggalluvial: Layered Grammar for Alluvial Plots.” Journal of Open Source Software, 5(49), 2017. doi:10.21105/joss.02017.
path <- sine()
ggplot2::ggplot(data = path, ggplot2::aes(x = x, y = y)) + ggplot2::geom_point()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.