sigmoid: Animate sigmoid path

View source: R/curve-shape.R

sigmoidR Documentation

Animate sigmoid path

Description

This function creates a path from the starting point (x_start, y_start) to the ending point (x_end, y_end) with the sigmoid shape.

Usage

sigmoid(x_start = 0, x_end = 1, y_start = 0, y_end = 1, scale = 5, n = 100)

Arguments

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.

scale

A numeric value that controls the length of the sigmoid.

n

A numeric value that controls the number of points between starting and ending points.

Value

Return a path in a data frame format

References

Recreate - Sankey flow chart. (n.d.). Emil Hvitfeldt. Retrieved April 13, 2023, from https://www.emilhvitfeldt.com/post/2018-03-20-recreate-sankey-flow-chart/

Examples

path <- sigmoid()

ggplot2::ggplot(data = path, ggplot2::aes(x = x, y = y)) + ggplot2::geom_point()


animbook documentation built on June 22, 2024, 7:14 p.m.