IntegerTable

Qualified name: manim.mobject.table.IntegerTable

class IntegerTable(table, element_to_mobject=<class 'manim.mobject.numbers.Integer'>, **kwargs)[source]

Bases: manim.mobject.table.Table

A specialized Table mobject for use with with Integer.

Examples

Example: IntegerTableExample

../_images/IntegerTableExample-1.png
from manim import *

class IntegerTableExample(Scene):
    def construct(self):
        t0 = IntegerTable(
            [[0,30,45,60,90],
            [90,60,45,30,0]],
            col_labels=[
                MathTex("\\frac{\sqrt{0}}{2}"),
                MathTex("\\frac{\sqrt{1}}{2}"),
                MathTex("\\frac{\sqrt{2}}{2}"),
                MathTex("\\frac{\sqrt{3}}{2}"),
                MathTex("\\frac{\sqrt{4}}{2}")],
            row_labels=[MathTex("\sin"), MathTex("\cos")],
            h_buff=1,
            element_to_mobject_config={"unit": "^{\circ}"})
        self.add(t0)

Special case of Table with element_to_mobject set to Integer. Will round if there are decimal entries in the table.

Parameters
  • table (Iterable[Iterable[Union[float, str]]]) – A 2d array or list of lists. Content of the table has to be valid input for Integer.

  • element_to_mobject (Callable[[Union[float, str]], VMobject]) – The Mobject class applied to the table entries. Set as Integer.

  • kwargs (Any) – Additional arguments to be passed to Table.

Methods

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.