Learn R Programming

RandomWalker (version 1.1.0)

plot_double_pendulum: Plot a Double Pendulum Trajectory

Description

Plot a Double Pendulum Trajectory

Usage

plot_double_pendulum(.data, .walk = 1)

Value

A customizable ggplot of the second bob's spatial trajectory, colored by elapsed seconds. Coordinates are in meters.

a ggplot2 object.

Arguments

.data

Data returned by double_pendulum_walk().

.walk

One walk_number label to display, rather than its position.

Author

Steven P. Sanderson II, MPH

See Also

Other Visualization Functions: animate_double_pendulum(), visualize_walks()

Examples

Run this code
if (requireNamespace("deSolve", quietly = TRUE)) {
  plot_double_pendulum(double_pendulum_walk(.num_walks = 1, .n = 200))
}

Run the code above in your browser using DataLab