Skip to contents

Creates an animated scatter plot from a data frame.

Usage

animate_scatter(
  data,
  x,
  y,
  size = NULL,
  color = NULL,
  group = NULL,
  transition = "grow",
  duration = 2,
  name = "scatter_animation"
)

Arguments

data

A data frame

x

Column for x-axis (unquoted)

y

Column for y-axis (unquoted)

size

Column for point size (optional)

color

Column for point color (optional)

group

Column for grouping (optional)

transition

Type of transition animation

duration

Animation duration

name

Scene name

Value

A Scene object

Examples

if (FALSE) { # \dontrun{
mtcars %>%
  animate_scatter(mpg, wt, color = cyl) %>%
  render()
} # }