IntegerMatrix#
Qualified name: manim.mobject.matrix.IntegerMatrix
- class IntegerMatrix(matrix, element_to_mobject=<class 'manim.mobject.text.numbers.Integer'>, **kwargs)[source]#
Bases:
MatrixA mobject that displays a matrix with integer entries on the screen.
Examples
Example: IntegerMatrixExample ¶
from manim import * class IntegerMatrixExample(Scene): def construct(self): m0 = IntegerMatrix( [[3.7, 2], [42.2, 12]], left_bracket="(", right_bracket=")") self.add(m0)
Will round if there are decimal entries in the matrix.
- Parameters
matrix (Iterable) – A numpy 2d array or list of lists
element_to_mobject (Mobject) – Mobject to use, by default Integer
Methods
Attributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.