Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add example Mobject scale method (#1700)

andrehisatsuga9eb514cfa098
diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py
index 70816a06e..ae03811ff 100644
--- a/manim/mobject/mobject.py
+++ b/manim/mobject/mobject.py
@@ -1145,6 +1145,22 @@ class Mobject(Container):
Mobject
The scaled mobject.
+ Examples
+ --------
+
+ .. manim:: MobjectScaleExample
+ :save_last_frame:
+
+ class MobjectScaleExample(Scene):
+ def construct(self):
+ f1 = Text("F")
+ f2 = Text("F").scale(2)
+ f3 = Text("F").scale(0.5)
+ f4 = Text("F").scale(-1)
+
+ vgroup = VGroup(f1, f2, f3, f4).arrange(6 * RIGHT)
+ self.add(vgroup)
+
See also
--------
:meth:`move_to`