Skip to contents

The starting point for the grammar of animated graphics. Similar to ggplot2's ggplot(), this creates an animation specification that layers are added to with +.

Usage

manim_plot(data = NULL, mapping = NULL, scene_config = NULL)

Arguments

data

A data.frame (optional, can be provided per layer)

mapping

Default aesthetic mapping (via aes())

scene_config

List of scene configuration options

Value

A ManimPlot object (list with class "ManimPlot")

Examples

if (FALSE) { # \dontrun{
# Simple point animation
df <- data.frame(x = 1:10, y = sin(1:10))
manim_plot(df) +
  anim_point(aes(x, y)) +
  anim_transition("grow") +
  anim_render()

# Function animation
manim_plot() +
  anim_function(function(x) sin(x), x_range = c(-PI, PI)) +
  anim_transition("create") +
  anim_render()
} # }