Skip to contents

Displays a variable name and its tracked value, e.g. "x = 3.14".

Super class

manimR::MObject -> Variable

Public fields

tracker

The ValueTracker

label

The variable label text

decimal

The DecimalNumber display

Methods

Inherited methods


Method new()

Create a Variable display

Usage

Variable$new(
  var_name = "x",
  value = 0,
  num_decimal_places = 2,
  color = WHITE,
  ...
)

Arguments

var_name

Variable name string

value

Initial value

num_decimal_places

Decimal places

color

Color

...

Additional args


Method get_text()

Get the formatted display text

Usage

Variable$get_text()


Method get_tracker()

Get the ValueTracker

Usage

Variable$get_tracker()


Method clone()

The objects of this class are cloneable with this method.

Usage

Variable$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.