MVariable#
Qualified name: manim\_data\_structures.m\_variable.MVariable
- class manim_data_structures.m_variable.MVariable(value='', index='', label='', mob_value_args: dict = {'text': 10}, mob_index_args: dict = {'text': 0}, mob_label_args: dict = {'text': 'Var'}, **kwargs)#
Bases:
MArrayElement
A class that represents a variable.
Parameters#
- value
Specifies the value of the variable.
- index
Specifies the index of the variable.
- label
Specifies the label of the variable.
- mob_square_args
dict
, default: {} Arguments for
manim.Square
that represents the element body.- mob_value_args
dict
, default: {} Arguments for
manim.Text
that represents the element value.- mob_index_args
dict
, default: {} Arguments for
manim.Text
that represents the element index.
Attributes#
- __value
Specifies the value of the variable.
- __index
Specifies the index of the variable.
- __label
Specifies the label of the variable.
Methods
Fetches
__index
.Fetches
__label
.Fetches
__value
.Updates
__index
and themanim.Text
that represents the element index.Updates
__label
and themanim.Text
that represents the element label.Updates
__value
and themanim.Text
that represents the element value.Inherited Attributes
animate
Used to animate the application of any method of
self
.color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The width of the mobject.
- update_index(index, mob_index_args: dict = {}) Text #
Updates
__index
and themanim.Text
that represents the element index.Parameters#
- mob_index_args
dict
, default: {} Arguments for
manim.Text
that represents the element index.
Returns#
manim.Text
Represents the updated element index.
- mob_index_args