IntegerTable#

Qualified name: manim.mobject.table.IntegerTable

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

Bases: Table

A specialized Table mobject for use 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)
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[float | str]]) – A 2d array or list of lists. Content of the table has to be valid input for Integer.

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

  • kwargs – Additional arguments to be passed to Table.

Methods

Attributes

animate

Used to animate the application of any method of self.

animation_overrides

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.

_original__init__(table, element_to_mobject=<class 'manim.mobject.text.numbers.Integer'>, **kwargs)#

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[float | str]]) – A 2d array or list of lists. Content of the table has to be valid input for Integer.

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

  • kwargs – Additional arguments to be passed to Table.