manim 0.18.0.post0__py3-none-any.whl → 0.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of manim might be problematic. Click here for more details.
- manim/__init__.py +3 -6
- manim/__main__.py +61 -20
- manim/_config/__init__.py +6 -3
- manim/_config/cli_colors.py +16 -8
- manim/_config/default.cfg +1 -3
- manim/_config/logger_utils.py +14 -8
- manim/_config/utils.py +651 -472
- manim/animation/animation.py +152 -5
- manim/animation/composition.py +80 -39
- manim/animation/creation.py +196 -14
- manim/animation/fading.py +5 -9
- manim/animation/indication.py +103 -47
- manim/animation/movement.py +22 -5
- manim/animation/rotation.py +3 -2
- manim/animation/specialized.py +4 -6
- manim/animation/speedmodifier.py +10 -5
- manim/animation/transform.py +4 -5
- manim/animation/transform_matching_parts.py +1 -1
- manim/animation/updaters/mobject_update_utils.py +17 -14
- manim/camera/camera.py +15 -6
- manim/cli/__init__.py +17 -0
- manim/cli/cfg/group.py +70 -44
- manim/cli/checkhealth/checks.py +93 -75
- manim/cli/checkhealth/commands.py +14 -5
- manim/cli/default_group.py +157 -25
- manim/cli/init/commands.py +32 -24
- manim/cli/plugins/commands.py +16 -3
- manim/cli/render/commands.py +72 -60
- manim/cli/render/ease_of_access_options.py +4 -3
- manim/cli/render/global_options.py +51 -15
- manim/cli/render/output_options.py +6 -5
- manim/cli/render/render_options.py +97 -32
- manim/constants.py +65 -19
- manim/gui/gui.py +2 -0
- manim/mobject/frame.py +0 -1
- manim/mobject/geometry/arc.py +112 -78
- manim/mobject/geometry/boolean_ops.py +32 -25
- manim/mobject/geometry/labeled.py +300 -77
- manim/mobject/geometry/line.py +132 -64
- manim/mobject/geometry/polygram.py +126 -30
- manim/mobject/geometry/shape_matchers.py +35 -15
- manim/mobject/geometry/tips.py +38 -29
- manim/mobject/graph.py +414 -133
- manim/mobject/graphing/coordinate_systems.py +126 -64
- manim/mobject/graphing/functions.py +25 -15
- manim/mobject/graphing/number_line.py +24 -10
- manim/mobject/graphing/probability.py +2 -10
- manim/mobject/graphing/scale.py +6 -5
- manim/mobject/matrix.py +17 -19
- manim/mobject/mobject.py +314 -165
- manim/mobject/opengl/opengl_compatibility.py +2 -0
- manim/mobject/opengl/opengl_geometry.py +30 -9
- manim/mobject/opengl/opengl_image_mobject.py +2 -0
- manim/mobject/opengl/opengl_mobject.py +509 -343
- manim/mobject/opengl/opengl_point_cloud_mobject.py +5 -7
- manim/mobject/opengl/opengl_surface.py +3 -2
- manim/mobject/opengl/opengl_three_dimensions.py +2 -0
- manim/mobject/opengl/opengl_vectorized_mobject.py +46 -79
- manim/mobject/svg/brace.py +63 -13
- manim/mobject/svg/svg_mobject.py +4 -3
- manim/mobject/table.py +11 -13
- manim/mobject/text/code_mobject.py +186 -548
- manim/mobject/text/numbers.py +9 -7
- manim/mobject/text/tex_mobject.py +23 -14
- manim/mobject/text/text_mobject.py +70 -24
- manim/mobject/three_d/polyhedra.py +98 -1
- manim/mobject/three_d/three_d_utils.py +4 -4
- manim/mobject/three_d/three_dimensions.py +62 -34
- manim/mobject/types/image_mobject.py +42 -24
- manim/mobject/types/point_cloud_mobject.py +105 -67
- manim/mobject/types/vectorized_mobject.py +496 -228
- manim/mobject/value_tracker.py +5 -4
- manim/mobject/vector_field.py +5 -5
- manim/opengl/__init__.py +3 -3
- manim/plugins/__init__.py +14 -1
- manim/plugins/plugins_flags.py +14 -8
- manim/renderer/cairo_renderer.py +20 -10
- manim/renderer/opengl_renderer.py +21 -23
- manim/renderer/opengl_renderer_window.py +2 -0
- manim/renderer/shader.py +2 -3
- manim/renderer/shader_wrapper.py +5 -2
- manim/renderer/vectorized_mobject_rendering.py +5 -0
- manim/scene/moving_camera_scene.py +23 -0
- manim/scene/scene.py +90 -43
- manim/scene/scene_file_writer.py +316 -165
- manim/scene/section.py +17 -15
- manim/scene/three_d_scene.py +13 -21
- manim/scene/vector_space_scene.py +22 -9
- manim/typing.py +830 -70
- manim/utils/bezier.py +1667 -399
- manim/utils/caching.py +13 -5
- manim/utils/color/AS2700.py +2 -0
- manim/utils/color/BS381.py +3 -0
- manim/utils/color/DVIPSNAMES.py +96 -0
- manim/utils/color/SVGNAMES.py +179 -0
- manim/utils/color/X11.py +3 -0
- manim/utils/color/XKCD.py +3 -0
- manim/utils/color/__init__.py +8 -5
- manim/utils/color/core.py +844 -309
- manim/utils/color/manim_colors.py +7 -9
- manim/utils/commands.py +48 -20
- manim/utils/config_ops.py +18 -13
- manim/utils/debug.py +8 -7
- manim/utils/deprecation.py +90 -40
- manim/utils/docbuild/__init__.py +17 -0
- manim/utils/docbuild/autoaliasattr_directive.py +234 -0
- manim/utils/docbuild/autocolor_directive.py +21 -17
- manim/utils/docbuild/manim_directive.py +50 -35
- manim/utils/docbuild/module_parsing.py +245 -0
- manim/utils/exceptions.py +6 -0
- manim/utils/family.py +5 -3
- manim/utils/family_ops.py +17 -4
- manim/utils/file_ops.py +26 -16
- manim/utils/hashing.py +9 -7
- manim/utils/images.py +10 -4
- manim/utils/ipython_magic.py +14 -8
- manim/utils/iterables.py +161 -119
- manim/utils/module_ops.py +57 -19
- manim/utils/opengl.py +83 -24
- manim/utils/parameter_parsing.py +32 -0
- manim/utils/paths.py +21 -23
- manim/utils/polylabel.py +168 -0
- manim/utils/qhull.py +218 -0
- manim/utils/rate_functions.py +74 -39
- manim/utils/simple_functions.py +24 -15
- manim/utils/sounds.py +7 -1
- manim/utils/space_ops.py +125 -69
- manim/utils/testing/__init__.py +17 -0
- manim/utils/testing/_frames_testers.py +13 -8
- manim/utils/testing/_show_diff.py +5 -3
- manim/utils/testing/_test_class_makers.py +33 -18
- manim/utils/testing/frames_comparison.py +27 -19
- manim/utils/tex.py +127 -197
- manim/utils/tex_file_writing.py +47 -45
- manim/utils/tex_templates.py +2 -1
- manim/utils/unit.py +6 -5
- {manim-0.18.0.post0.dist-info → manim-0.19.0.dist-info}/LICENSE.community +1 -1
- {manim-0.18.0.post0.dist-info → manim-0.19.0.dist-info}/METADATA +40 -39
- manim-0.19.0.dist-info/RECORD +221 -0
- {manim-0.18.0.post0.dist-info → manim-0.19.0.dist-info}/WHEEL +1 -1
- manim/cli/new/__init__.py +0 -0
- manim/cli/new/group.py +0 -189
- manim/plugins/import_plugins.py +0 -43
- manim-0.18.0.post0.dist-info/RECORD +0 -217
- {manim-0.18.0.post0.dist-info → manim-0.19.0.dist-info}/LICENSE +0 -0
- {manim-0.18.0.post0.dist-info → manim-0.19.0.dist-info}/entry_points.txt +0 -0
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from manim.mobject.mobject import Mobject
|
|
5
6
|
from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject
|
|
6
7
|
|
|
7
8
|
__all__ = ["NumberLine", "UnitInterval"]
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
from
|
|
11
|
+
from collections.abc import Iterable, Sequence
|
|
12
|
+
from typing import TYPE_CHECKING, Callable
|
|
11
13
|
|
|
12
14
|
if TYPE_CHECKING:
|
|
13
15
|
from manim.mobject.geometry.tips import ArrowTip
|
|
16
|
+
from manim.typing import Point3DLike
|
|
14
17
|
|
|
15
18
|
import numpy as np
|
|
16
19
|
|
|
@@ -274,7 +277,8 @@ class NumberLine(Line):
|
|
|
274
277
|
|
|
275
278
|
def add_ticks(self):
|
|
276
279
|
"""Adds ticks to the number line. Ticks can be accessed after creation
|
|
277
|
-
via ``self.ticks``.
|
|
280
|
+
via ``self.ticks``.
|
|
281
|
+
"""
|
|
278
282
|
ticks = VGroup()
|
|
279
283
|
elongated_tick_size = self.tick_size * self.longer_tick_multiple
|
|
280
284
|
elongated_tick_offsets = self.numbers_with_elongated_ticks - self.x_min
|
|
@@ -343,6 +347,7 @@ class NumberLine(Line):
|
|
|
343
347
|
def number_to_point(self, number: float | np.ndarray) -> np.ndarray:
|
|
344
348
|
"""Accepts a value along the number line and returns a point with
|
|
345
349
|
respect to the scene.
|
|
350
|
+
Equivalent to `NumberLine @ number`
|
|
346
351
|
|
|
347
352
|
Parameters
|
|
348
353
|
----------
|
|
@@ -363,7 +368,9 @@ class NumberLine(Line):
|
|
|
363
368
|
array([0., 0., 0.])
|
|
364
369
|
>>> number_line.number_to_point(1)
|
|
365
370
|
array([1., 0., 0.])
|
|
366
|
-
>>> number_line
|
|
371
|
+
>>> number_line @ 1
|
|
372
|
+
array([1., 0., 0.])
|
|
373
|
+
>>> number_line.number_to_point([1, 2, 3])
|
|
367
374
|
array([[1., 0., 0.],
|
|
368
375
|
[2., 0., 0.],
|
|
369
376
|
[3., 0., 0.]])
|
|
@@ -395,11 +402,11 @@ class NumberLine(Line):
|
|
|
395
402
|
|
|
396
403
|
>>> from manim import NumberLine
|
|
397
404
|
>>> number_line = NumberLine()
|
|
398
|
-
>>> number_line.point_to_number((0,0,0))
|
|
399
|
-
0.0
|
|
400
|
-
>>> number_line.point_to_number((1,0,0))
|
|
401
|
-
1.0
|
|
402
|
-
>>> number_line.point_to_number([[0.5,0,0],[1,0,0],[1.5,0,0]])
|
|
405
|
+
>>> number_line.point_to_number((0, 0, 0))
|
|
406
|
+
np.float64(0.0)
|
|
407
|
+
>>> number_line.point_to_number((1, 0, 0))
|
|
408
|
+
np.float64(1.0)
|
|
409
|
+
>>> number_line.point_to_number([[0.5, 0, 0], [1, 0, 0], [1.5, 0, 0]])
|
|
403
410
|
array([0.5, 1. , 1.5])
|
|
404
411
|
|
|
405
412
|
"""
|
|
@@ -475,7 +482,7 @@ class NumberLine(Line):
|
|
|
475
482
|
num_mob.next_to(self.number_to_point(x), direction=direction, buff=buff)
|
|
476
483
|
if x < 0 and self.label_direction[0] == 0:
|
|
477
484
|
# Align without the minus sign
|
|
478
|
-
num_mob.shift(num_mob[0].
|
|
485
|
+
num_mob.shift(num_mob[0].width * LEFT / 2)
|
|
479
486
|
return num_mob
|
|
480
487
|
|
|
481
488
|
def get_number_mobjects(self, *numbers, **kwargs) -> VGroup:
|
|
@@ -574,7 +581,6 @@ class NumberLine(Line):
|
|
|
574
581
|
AttributeError
|
|
575
582
|
If the label does not have a ``font_size`` attribute, an ``AttributeError`` is raised.
|
|
576
583
|
"""
|
|
577
|
-
|
|
578
584
|
direction = self.label_direction if direction is None else direction
|
|
579
585
|
buff = self.line_to_number_buff if buff is None else buff
|
|
580
586
|
font_size = self.font_size if font_size is None else font_size
|
|
@@ -641,6 +647,14 @@ class NumberLine(Line):
|
|
|
641
647
|
return 0
|
|
642
648
|
return len(step.split(".")[-1])
|
|
643
649
|
|
|
650
|
+
def __matmul__(self, other: float):
|
|
651
|
+
return self.n2p(other)
|
|
652
|
+
|
|
653
|
+
def __rmatmul__(self, other: Point3DLike | Mobject):
|
|
654
|
+
if isinstance(other, Mobject):
|
|
655
|
+
other = other.get_center()
|
|
656
|
+
return self.p2n(other)
|
|
657
|
+
|
|
644
658
|
|
|
645
659
|
class UnitInterval(NumberLine):
|
|
646
660
|
def __init__(
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
__all__ = ["SampleSpace", "BarChart"]
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
from
|
|
8
|
+
from collections.abc import Iterable, MutableSequence, Sequence
|
|
9
9
|
|
|
10
10
|
import numpy as np
|
|
11
11
|
|
|
@@ -319,7 +319,6 @@ class BarChart(Axes):
|
|
|
319
319
|
Primarily used when the bars are initialized with ``self._add_bars``
|
|
320
320
|
or updated via ``self.change_bar_values``.
|
|
321
321
|
"""
|
|
322
|
-
|
|
323
322
|
self.bars.set_color_by_gradient(*self.bar_colors)
|
|
324
323
|
|
|
325
324
|
def _add_x_axis_labels(self):
|
|
@@ -329,7 +328,6 @@ class BarChart(Axes):
|
|
|
329
328
|
|
|
330
329
|
UP for negative values and DOWN for positive values.
|
|
331
330
|
"""
|
|
332
|
-
|
|
333
331
|
val_range = np.arange(
|
|
334
332
|
0.5, len(self.bar_names), 1
|
|
335
333
|
) # 0.5 shifted so that labels are centered, not on ticks
|
|
@@ -339,10 +337,7 @@ class BarChart(Axes):
|
|
|
339
337
|
for i, (value, bar_name) in enumerate(zip(val_range, self.bar_names)):
|
|
340
338
|
# to accommodate negative bars, the label may need to be
|
|
341
339
|
# below or above the x_axis depending on the value of the bar
|
|
342
|
-
if self.values[i] < 0
|
|
343
|
-
direction = UP
|
|
344
|
-
else:
|
|
345
|
-
direction = DOWN
|
|
340
|
+
direction = UP if self.values[i] < 0 else DOWN
|
|
346
341
|
bar_name_label = self.x_axis.label_constructor(bar_name)
|
|
347
342
|
|
|
348
343
|
bar_name_label.font_size = self.x_axis.font_size
|
|
@@ -372,7 +367,6 @@ class BarChart(Axes):
|
|
|
372
367
|
Rectangle
|
|
373
368
|
A positioned rectangle representing a bar on the chart.
|
|
374
369
|
"""
|
|
375
|
-
|
|
376
370
|
# bar measurements relative to the axis
|
|
377
371
|
|
|
378
372
|
# distance from between the y-axis and the top of the bar
|
|
@@ -435,7 +429,6 @@ class BarChart(Axes):
|
|
|
435
429
|
|
|
436
430
|
self.add(chart, c_bar_lbls)
|
|
437
431
|
"""
|
|
438
|
-
|
|
439
432
|
bar_labels = VGroup()
|
|
440
433
|
for bar, value in zip(self.bars, self.values):
|
|
441
434
|
bar_lbl = label_constructor(str(value))
|
|
@@ -483,7 +476,6 @@ class BarChart(Axes):
|
|
|
483
476
|
chart.change_bar_values(list(reversed(values)))
|
|
484
477
|
self.add(chart.get_bar_labels(font_size=24))
|
|
485
478
|
"""
|
|
486
|
-
|
|
487
479
|
for i, (bar, value) in enumerate(zip(self.bars, values)):
|
|
488
480
|
chart_val = self.values[i]
|
|
489
481
|
|
manim/mobject/graphing/scale.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import math
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Iterable
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
5
6
|
|
|
6
7
|
import numpy as np
|
|
7
8
|
|
|
@@ -89,7 +90,6 @@ class LinearBase(_ScaleBase):
|
|
|
89
90
|
scale_factor
|
|
90
91
|
The slope of the linear function, by default 1.0
|
|
91
92
|
"""
|
|
92
|
-
|
|
93
93
|
super().__init__()
|
|
94
94
|
self.scale_factor = scale_factor
|
|
95
95
|
|
|
@@ -145,7 +145,9 @@ class LogBase(_ScaleBase):
|
|
|
145
145
|
"""Inverse of ``function``. The value must be greater than 0"""
|
|
146
146
|
if isinstance(value, np.ndarray):
|
|
147
147
|
condition = value.any() <= 0
|
|
148
|
-
|
|
148
|
+
|
|
149
|
+
def func(value, base):
|
|
150
|
+
return np.log(value) / np.log(base)
|
|
149
151
|
else:
|
|
150
152
|
condition = value <= 0
|
|
151
153
|
func = math.log
|
|
@@ -174,12 +176,11 @@ class LogBase(_ScaleBase):
|
|
|
174
176
|
base_config
|
|
175
177
|
Additional arguments to be passed to :class:`~.Integer`.
|
|
176
178
|
"""
|
|
177
|
-
|
|
178
179
|
# uses `format` syntax to control the number of decimal places.
|
|
179
180
|
tex_labels = [
|
|
180
181
|
Integer(
|
|
181
182
|
self.base,
|
|
182
|
-
unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"),
|
|
183
|
+
unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"), # noqa: UP031
|
|
183
184
|
**base_config,
|
|
184
185
|
)
|
|
185
186
|
for i in val_range
|
manim/mobject/matrix.py
CHANGED
|
@@ -15,8 +15,8 @@ Examples
|
|
|
15
15
|
m2 = DecimalMatrix(
|
|
16
16
|
[[3.456, 2.122], [33.2244, 12.33]],
|
|
17
17
|
element_to_mobject_config={"num_decimal_places": 2},
|
|
18
|
-
left_bracket="
|
|
19
|
-
right_bracket="
|
|
18
|
+
left_bracket=r"\{",
|
|
19
|
+
right_bracket=r"\}")
|
|
20
20
|
m3 = MobjectMatrix(
|
|
21
21
|
[[Circle().scale(0.3), Square().scale(0.3)],
|
|
22
22
|
[MathTex("\\pi").scale(2), Star().scale(0.3)]],
|
|
@@ -40,7 +40,7 @@ __all__ = [
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
import itertools as it
|
|
43
|
-
from
|
|
43
|
+
from collections.abc import Iterable, Sequence
|
|
44
44
|
|
|
45
45
|
import numpy as np
|
|
46
46
|
|
|
@@ -72,7 +72,7 @@ def matrix_to_mobject(matrix):
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
75
|
-
"""A mobject that displays a matrix on the screen.
|
|
75
|
+
r"""A mobject that displays a matrix on the screen.
|
|
76
76
|
|
|
77
77
|
Parameters
|
|
78
78
|
----------
|
|
@@ -118,22 +118,22 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
118
118
|
|
|
119
119
|
class MatrixExamples(Scene):
|
|
120
120
|
def construct(self):
|
|
121
|
-
m0 = Matrix([[2, "
|
|
121
|
+
m0 = Matrix([[2, r"\pi"], [-1, 1]])
|
|
122
122
|
m1 = Matrix([[2, 0, 4], [-1, 1, 5]],
|
|
123
123
|
v_buff=1.3,
|
|
124
124
|
h_buff=0.8,
|
|
125
125
|
bracket_h_buff=SMALL_BUFF,
|
|
126
126
|
bracket_v_buff=SMALL_BUFF,
|
|
127
|
-
left_bracket="
|
|
128
|
-
right_bracket="
|
|
127
|
+
left_bracket=r"\{",
|
|
128
|
+
right_bracket=r"\}")
|
|
129
129
|
m1.add(SurroundingRectangle(m1.get_columns()[1]))
|
|
130
130
|
m2 = Matrix([[2, 1], [-1, 3]],
|
|
131
131
|
element_alignment_corner=UL,
|
|
132
132
|
left_bracket="(",
|
|
133
133
|
right_bracket=")")
|
|
134
134
|
m3 = Matrix([[2, 1], [-1, 3]],
|
|
135
|
-
left_bracket="
|
|
136
|
-
right_bracket="
|
|
135
|
+
left_bracket=r"\langle",
|
|
136
|
+
right_bracket=r"\rangle")
|
|
137
137
|
m4 = Matrix([[2, 1], [-1, 3]],
|
|
138
138
|
).set_column_colors(RED, GREEN)
|
|
139
139
|
m5 = Matrix([[2, 1], [-1, 3]],
|
|
@@ -241,7 +241,6 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
241
241
|
:class:`Matrix`
|
|
242
242
|
The current matrix object (self).
|
|
243
243
|
"""
|
|
244
|
-
|
|
245
244
|
# Height per row of LaTeX array with default settings
|
|
246
245
|
BRACKET_HEIGHT = 0.5977
|
|
247
246
|
|
|
@@ -280,7 +279,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
280
279
|
return self
|
|
281
280
|
|
|
282
281
|
def get_columns(self):
|
|
283
|
-
"""Return columns of the matrix as VGroups.
|
|
282
|
+
r"""Return columns of the matrix as VGroups.
|
|
284
283
|
|
|
285
284
|
Returns
|
|
286
285
|
--------
|
|
@@ -295,11 +294,10 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
295
294
|
|
|
296
295
|
class GetColumnsExample(Scene):
|
|
297
296
|
def construct(self):
|
|
298
|
-
m0 = Matrix([["
|
|
297
|
+
m0 = Matrix([[r"\pi", 3], [1, 5]])
|
|
299
298
|
m0.add(SurroundingRectangle(m0.get_columns()[1]))
|
|
300
299
|
self.add(m0)
|
|
301
300
|
"""
|
|
302
|
-
|
|
303
301
|
return VGroup(
|
|
304
302
|
*(
|
|
305
303
|
VGroup(*(row[i] for row in self.mob_matrix))
|
|
@@ -308,7 +306,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
308
306
|
)
|
|
309
307
|
|
|
310
308
|
def set_column_colors(self, *colors: str):
|
|
311
|
-
"""Set individual colors for each columns of the matrix.
|
|
309
|
+
r"""Set individual colors for each columns of the matrix.
|
|
312
310
|
|
|
313
311
|
Parameters
|
|
314
312
|
----------
|
|
@@ -338,7 +336,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
338
336
|
return self
|
|
339
337
|
|
|
340
338
|
def get_rows(self):
|
|
341
|
-
"""Return rows of the matrix as VGroups.
|
|
339
|
+
r"""Return rows of the matrix as VGroups.
|
|
342
340
|
|
|
343
341
|
Returns
|
|
344
342
|
--------
|
|
@@ -360,7 +358,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
360
358
|
return VGroup(*(VGroup(*row) for row in self.mob_matrix))
|
|
361
359
|
|
|
362
360
|
def set_row_colors(self, *colors: str):
|
|
363
|
-
"""Set individual colors for each row of the matrix.
|
|
361
|
+
r"""Set individual colors for each row of the matrix.
|
|
364
362
|
|
|
365
363
|
Parameters
|
|
366
364
|
----------
|
|
@@ -438,7 +436,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
438
436
|
return self.elements
|
|
439
437
|
|
|
440
438
|
def get_brackets(self):
|
|
441
|
-
"""Return the bracket mobjects.
|
|
439
|
+
r"""Return the bracket mobjects.
|
|
442
440
|
|
|
443
441
|
Returns
|
|
444
442
|
--------
|
|
@@ -464,7 +462,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
|
|
|
464
462
|
|
|
465
463
|
|
|
466
464
|
class DecimalMatrix(Matrix):
|
|
467
|
-
"""A mobject that displays a matrix with decimal entries on the screen.
|
|
465
|
+
r"""A mobject that displays a matrix with decimal entries on the screen.
|
|
468
466
|
|
|
469
467
|
Examples
|
|
470
468
|
--------
|
|
@@ -544,7 +542,7 @@ class IntegerMatrix(Matrix):
|
|
|
544
542
|
|
|
545
543
|
|
|
546
544
|
class MobjectMatrix(Matrix):
|
|
547
|
-
"""A mobject that displays a matrix of mobject entries on the screen.
|
|
545
|
+
r"""A mobject that displays a matrix of mobject entries on the screen.
|
|
548
546
|
|
|
549
547
|
Examples
|
|
550
548
|
--------
|