powered by
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)
Return a path in a data frame format
The x-coordinate of the starting point.
The x-coordinate of the ending point.
The y-coordinate of the starting point.
The y-coordinate of the ending point.
A numeric value that controls the number of points between starting and ending points.
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()
Run the code above in your browser using DataLab