Skip to contents

Smoothly transitions between two data states. Points morph from one set of positions to another, useful for showing data before/after transformations.

Animates a transition between two states of data (e.g., before/after filtering).

Usage

animate_data_transition(
  scene,
  from,
  to,
  duration = 1,
  transition_type = "morph"
)

animate_data_transition(
  scene,
  from,
  to,
  duration = 1,
  transition_type = "morph"
)

Arguments

scene

A Scene object

from

Starting data state

to

Ending data state

duration

Duration of transition

transition_type

Type of transition ("morph", "fade", "slide")

from_data

Initial data positions (data.frame with x, y)

to_data

Final data positions (same structure)

x

X column name

y

Y column name

color

Dot color

axes

Axes object

Value

Scene object

The Scene object