Skip to contents

Creates an animated histogram where bars grow from the x-axis. Supports custom bin widths, color mapping, and optional density overlay.

Usage

animate_histogram(
  data,
  bins = 30,
  color = BLUE,
  axes = NULL,
  show_density = FALSE,
  density_color = YELLOW,
  duration = 3
)

Arguments

data

Numeric vector or data.frame column

bins

Number of bins

color

Bar fill color

axes

Axes object (NULL = auto)

show_density

Overlay a density curve

density_color

Density curve color

duration

Animation duration

Value

A Scene object