Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

arrange_submobjects -> arrange

Grant Sanderson20f25615a6f4
diff --git a/active_projects/eola2/cramer.py b/active_projects/eola2/cramer.py
index 3f64a81ae..fd4f1a7f6 100644
--- a/active_projects/eola2/cramer.py
+++ b/active_projects/eola2/cramer.py
@@ -65,7 +65,7 @@ class LinearSystem(VGroup):
self.equals,
self.output_vect_mob,
)
- self.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ self.arrange(RIGHT, buff=SMALL_BUFF)
# Scenes
@@ -110,7 +110,7 @@ class LeaveItToComputers(TeacherStudentsScene):
denom_matrix_mobject,
)
rhs = VGroup(numer, Line(LEFT, RIGHT).match_width(numer), denom)
- rhs.arrange_submobjects(DOWN)
+ rhs.arrange(DOWN)
rhs.set_height(2.25)
rhs.move_to(self.hold_up_spot, DOWN)
rhs.to_edge(RIGHT, buff=LARGE_BUFF)
@@ -224,7 +224,7 @@ class PrerequisiteKnowledge(TeacherStudentsScene):
ImageMobject("eola%d_thumbnail" % d)
for d in [5, 7, 6]
])
- images.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ images.arrange(RIGHT, buff=LARGE_BUFF)
images.next_to(h_line, DOWN, MED_LARGE_BUFF)
for image in images:
rect = SurroundingRectangle(image, color=BLUE)
@@ -545,7 +545,7 @@ class SetupSimpleSystemOfEquations(LinearTransformationScene):
system.output_vect_elements.add(line[-1])
system.output_vect_elements.set_color(OUTPUT_COLOR)
- system.arrange_submobjects(
+ system.arrange(
DOWN,
buff=0.75,
index_of_submobject_to_align=-2
@@ -762,7 +762,7 @@ class ThinkOfPuzzleAsLinearCombination(SetupSimpleSystemOfEquations):
equals.target,
output_vect.target
)
- new_system.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ new_system.arrange(RIGHT, buff=SMALL_BUFF)
new_system.move_to(matrix, LEFT)
corner_rect.generate_target()
@@ -871,10 +871,10 @@ class LookAtDotProducts(SetupSimpleSystemOfEquations):
if isinstance(part, Matrix):
part.scale(self.array_scale_factor)
equation[2].elements.set_color([X_COLOR, Y_COLOR][i])
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.scale(self.equation_scale_factor)
equations.add(equation)
- equations.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF)
+ equations.arrange(DOWN, buff=MED_LARGE_BUFF)
equations.to_corner(UL)
corner_rect = self.corner_rect = BackgroundRectangle(
equations, opacity=0.8)
@@ -949,7 +949,7 @@ class LookAtDotProducts(SetupSimpleSystemOfEquations):
T2, lp2, basis, rp2, equals,
coord
)
- transformed_equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ transformed_equation.arrange(RIGHT, buff=SMALL_BUFF)
# transformed_equation.scale(self.equation_scale_factor)
implies = TexMobject("\\Rightarrow").scale(1.2)
@@ -1120,7 +1120,7 @@ class ShowDotProductChanging(LinearTransformationScene):
w_label.copy(),
TexMobject(rhs),
)
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.add_to_back(BackgroundRectangle(equation))
equation.scale(self.equation_scale_factor)
return equation
@@ -1160,7 +1160,7 @@ class OrthonormalWords(Scene):
)
bottom_words.set_color_by_tex("Orthonormal", BLUE)
words = VGroup(top_words, bottom_words)
- words.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF)
+ words.arrange(DOWN, buff=MED_LARGE_BUFF)
for word in words:
word.add_background_rectangle()
words.to_edge(UP)
@@ -1311,11 +1311,11 @@ class SolvingASystemWithOrthonormalMatrix(LinearTransformationScene):
element.scale(1.25)
equation.to_write = equation[1::2]
equation[2].match_height(equation[4])
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.background_rectangle = BackgroundRectangle(equation)
equation.add_to_back(equation.background_rectangle)
equations.add(equation)
- equations.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF)
+ equations.arrange(DOWN, buff=MED_LARGE_BUFF)
equations.scale(1.25)
equations.to_corner(UR, buff=MED_SMALL_BUFF)
equations_rect = BackgroundRectangle(equations, buff=MED_LARGE_BUFF)
@@ -1661,7 +1661,7 @@ class TransformingAreasYCoord(LinearTransformationScene):
transformed_input_vect_label = VGroup(input_vect_label.copy())
transformed_input_vect_label.add_to_back(matrix_label.copy())
- transformed_input_vect_label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ transformed_input_vect_label.arrange(RIGHT, buff=SMALL_BUFF)
transformed_input_vect_label.next_to(input_vect_mob.get_end(), UP)
self.play(
@@ -1755,7 +1755,7 @@ class TransformingAreasYCoord(LinearTransformationScene):
h_line = Line(LEFT, RIGHT).match_width(det)
frac = VGroup(area.target, h_line, det.target)
- frac.arrange_submobjects(DOWN)
+ frac.arrange(DOWN)
coord_equation = VGroup(coord.target, equals.target, frac)
equals.target.next_to(coord.target, RIGHT)
frac.next_to(equals.target, RIGHT, submobject_to_align=h_line)
@@ -1784,7 +1784,7 @@ class TransformingAreasYCoord(LinearTransformationScene):
rhs_h_line,
VGroup(matrix_mobject_copy, denom_det_text)
)
- rhs.arrange_submobjects(DOWN, buff=SMALL_BUFF)
+ rhs.arrange(DOWN, buff=SMALL_BUFF)
rhs_equals = TexMobject("=")
rhs_equals.next_to(h_line, RIGHT)
rhs.next_to(rhs_equals, submobject_to_align=rhs_h_line)
@@ -1808,7 +1808,7 @@ class TransformingAreasYCoord(LinearTransformationScene):
matrix_mobject.target,
system_input, system_eq, system_output.target
)
- system.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ system.arrange(RIGHT, buff=SMALL_BUFF)
system.to_corner(UL)
# Rearrange
@@ -1957,7 +1957,7 @@ class ZEqualsVDotK(Scene):
)
equation[2].elements.set_color_by_gradient(X_COLOR, Y_COLOR, Z_COLOR)
equation[4].elements.set_color(BLUE)
- equation.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ equation.arrange(RIGHT, buff=MED_SMALL_BUFF)
equation.to_edge(LEFT)
self.play(Write(equation))
@@ -2055,7 +2055,7 @@ class CramersYEvaluation(Scene):
TexMobject("="), frac,
TexMobject("= \\frac{4}{2}"), TexMobject("=2")
)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.add_to_back(BackgroundRectangle(group))
self.add(group)
@@ -2075,7 +2075,7 @@ class CramersXEvaluation(Scene):
TexMobject("="), frac,
TexMobject("= \\frac{6}{2}"), TexMobject("=3")
)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.add_to_back(BackgroundRectangle(group))
self.add(group)
diff --git a/active_projects/eola2/determinant_puzzle.py b/active_projects/eola2/determinant_puzzle.py
index aeda8480e..29a7bc20b 100644
--- a/active_projects/eola2/determinant_puzzle.py
+++ b/active_projects/eola2/determinant_puzzle.py
@@ -26,7 +26,7 @@ class WorkOutNumerically(Scene):
challenge = TextMobject("Explain in one sentence")
challenge.set_color(YELLOW)
group = VGroup(challenge, equation)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_edge(UP)
self.add(equation)
@@ -58,7 +58,7 @@ class WorkOutNumerically(Scene):
eq_parts[i2:i3], [self.M2_copy],
eq_parts[i3:],
))
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
eq_parts.get_part_by_tex("=").shift(0.2 * SMALL_BUFF * DOWN)
equation.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)
equation.next_to(self.original_equation, DOWN, MED_LARGE_BUFF)
@@ -78,7 +78,7 @@ class WorkOutNumerically(Scene):
"4", "\\cdot", "1", "\\big)"
),
)
- line1.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ line1.arrange(RIGHT, buff=SMALL_BUFF)
line1[0].set_color(self.M1_COLOR)
line1[1].set_color(self.M2_COLOR)
indices = [1, 3, 5, 7]
@@ -88,7 +88,7 @@ class WorkOutNumerically(Scene):
line3 = TexMobject("-15")
arrows = [TexMobject("\\downarrow") for x in range(2)]
lines = VGroup(line1, arrows[0], line2, arrows[1], line3)
- lines.arrange_submobjects(DOWN, buff=MED_SMALL_BUFF)
+ lines.arrange(DOWN, buff=MED_SMALL_BUFF)
lines.next_to(self.equation_with_numbers, DOWN, buff=MED_LARGE_BUFF)
lines.to_edge(RIGHT)
@@ -119,7 +119,7 @@ class WorkOutNumerically(Scene):
empty_det_tex[1:].scale(1.5)
empty_det_tex[1:].match_height(matrix, stretch=True)
det_tex = VGroup(empty_det_tex[:2], matrix, *empty_det_tex[2:])
- det_tex.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ det_tex.arrange(RIGHT, buff=SMALL_BUFF)
group = VGroup(
det_tex,
@@ -128,7 +128,7 @@ class WorkOutNumerically(Scene):
TexMobject("\\downarrow"),
TexMobject("-15"),
)
- group.arrange_submobjects(DOWN, buff=2 * SMALL_BUFF)
+ group.arrange(DOWN, buff=2 * SMALL_BUFF)
# group.set_height(0.4*FRAME_HEIGHT)
group.next_to(self.equation_with_numbers, DOWN)
group.shift(FRAME_WIDTH * LEFT / 4)
diff --git a/active_projects/eola2/gauss.py b/active_projects/eola2/gauss.py
index c6fa6bb37..60c8c150c 100644
--- a/active_projects/eola2/gauss.py
+++ b/active_projects/eola2/gauss.py
@@ -121,7 +121,7 @@ class ShowRowReduction(Scene):
TexMobject(")"),
TexMobject("r_%d" % (row_index + 1)),
)
- label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ label.arrange(RIGHT, buff=SMALL_BUFF)
label.to_edge(UP)
VGroup(label[0], label[-1]).set_color(self.changing_row_color)
@@ -177,7 +177,7 @@ class ShowRowReduction(Scene):
TexMobject(")"),
TexMobject("r_%d" % (row2_index + 1)),
)
- label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ label.arrange(RIGHT, buff=SMALL_BUFF)
label.to_edge(UP)
VGroup(label[0], label[2]).set_color(self.changing_row_color)
label[-1].set_color(self.reference_row_color)
diff --git a/active_projects/eop/bayes.py b/active_projects/eop/bayes.py
index bbf626427..44058a6cb 100644
--- a/active_projects/eop/bayes.py
+++ b/active_projects/eop/bayes.py
@@ -35,7 +35,7 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
community_cards = VGroup(*list(map(
PlayingCard, self.community_card_values
)))
- community_cards.arrange_submobjects(RIGHT)
+ community_cards.arrange(RIGHT)
community_cards.move_to(self.community_cards_center)
deck = VGroup(*[
PlayingCard(turned_over = True)
@@ -86,7 +86,7 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
straight_cards.submobjects.sort(
key=lambda c: c.numerical_value
)
- straight_cards.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ straight_cards.arrange(RIGHT, buff = SMALL_BUFF)
straight_cards.next_to(community_cards, UP, aligned_edge = LEFT)
you.hand.target.shift(MED_SMALL_BUFF*UP)
@@ -121,7 +121,7 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
her.hand.save_state()
her.hand.generate_target()
- her.hand.target.arrange_submobjects(RIGHT)
+ her.hand.target.arrange(RIGHT)
her.hand.target.next_to(heart_cards, UP)
her.hand.target.to_edge(UP)
@@ -138,7 +138,7 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
heart_q = VGroup(heart, q_mark)
for mob in heart_q:
mob.set_height(0.5)
- heart_q.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ heart_q.arrange(RIGHT, buff = SMALL_BUFF)
heart_q.move_to(target)
heart_qs.add(heart, q_mark)
hearts.add(heart)
@@ -292,9 +292,9 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
VGroup(*[
TexMobject("\\$")
for x in range(10)
- ]).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ]).arrange(RIGHT, buff = SMALL_BUFF)
for y in range(4)
- ]).arrange_submobjects(UP, buff = SMALL_BUFF)
+ ]).arrange(UP, buff = SMALL_BUFF)
money = VGroup(*it.chain(*pre_money))
money.set_color(GREEN)
money.scale(0.8)
@@ -337,7 +337,7 @@ class IntroducePokerHand(PiCreatureScene, SampleSpaceScene):
def move_community_cards_out_of_the_way(self):
cards = self.community_cards
cards.generate_target()
- cards.target.arrange_submobjects(
+ cards.target.arrange(
RIGHT, buff = -cards[0].get_width() + MED_SMALL_BUFF,
)
cards.target.move_to(self.deck)
@@ -621,7 +621,7 @@ class UpdatePokerPrior(SampleSpaceScene):
"What's her model of me?",
"\\vdots"
])))
- questions.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ questions.arrange(DOWN, aligned_edge = LEFT)
questions[-1].next_to(questions[-2], DOWN)
questions.scale(0.7)
questions.next_to(randy, UP)
@@ -737,15 +737,15 @@ class UpdatePokerPrior(SampleSpaceScene):
numerator = rects[0].target
plus = TexMobject("+")
denominator = VGroup(rects[1].target, plus, rects[2].target)
- denominator.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ denominator.arrange(RIGHT, buff = SMALL_BUFF)
frac_line = TexMobject("\\over")
frac_line.stretch_to_fit_width(denominator.get_width())
fraction = VGroup(numerator, frac_line, denominator)
- fraction.arrange_submobjects(DOWN)
+ fraction.arrange(DOWN)
arrow = TexMobject("\\downarrow")
group = VGroup(posterior_tex, arrow, fraction)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_corner(UP+RIGHT)
self.play(LaggedStart(FadeIn, posterior_tex))
@@ -854,7 +854,7 @@ class UpdatePokerPrior(SampleSpaceScene):
Arrow(ORIGIN, LEFT, tip_length = SMALL_BUFF)
for x in range(3)
])
- arrows.arrange_submobjects(DOWN)
+ arrows.arrange(DOWN)
arrows.next_to(prior_rects[1], RIGHT, SMALL_BUFF)
self.wait(2)
@@ -1037,7 +1037,7 @@ class UpdatePokerPrior(SampleSpaceScene):
def insert_double_heart(self, tex_mob):
double_heart = SuitSymbol("hearts")
double_heart.add(SuitSymbol("hearts"))
- double_heart.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ double_heart.arrange(RIGHT, buff = SMALL_BUFF)
double_heart.get_tex_string = lambda : self.double_heart_template
template = tex_mob.get_part_by_tex(self.double_heart_template)
double_heart.replace(template)
@@ -1629,7 +1629,7 @@ class MusicExample(SampleSpaceScene, PiCreatureScene):
for color in (BLUE_B, GREY_BROWN, MAROON_E)
])
friends.scale(0.6)
- friends.arrange_submobjects(RIGHT)
+ friends.arrange(RIGHT)
friends.next_to(randy, RIGHT, LARGE_BUFF, DOWN)
friends.to_edge(RIGHT)
for friend in friends:
diff --git a/active_projects/eop/bayes_footnote.py b/active_projects/eop/bayes_footnote.py
index d7fbdbe0f..5a76fad27 100644
--- a/active_projects/eop/bayes_footnote.py
+++ b/active_projects/eop/bayes_footnote.py
@@ -62,7 +62,7 @@ class Introduction(TeacherStudentsScene):
intuition = TextMobject("Intuition")
group = VGroup(bayes, arrow, intuition)
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
group.scale(0.8)
group.next_to(self.example, UP, buff = SMALL_BUFF)
group.shift_onto_screen()
@@ -120,7 +120,7 @@ class Introduction(TeacherStudentsScene):
bayes_to_intuition = VGroup(*list(map(TextMobject, [
"Bayes", "$\\leftrightarrow$", "Intuition"
])))
- bayes_to_intuition.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ bayes_to_intuition.arrange(RIGHT, buff = SMALL_BUFF)
bayes_to_intuition.next_to(brace, UP, SMALL_BUFF)
check = TexMobject("\\checkmark")
check.set_color(GREEN)
@@ -180,7 +180,7 @@ class Introduction(TeacherStudentsScene):
rect = self.get_example_rect()
values = IntroducePokerHand.CONFIG["community_card_values"]
community_cards = VGroup(*list(map(PlayingCard, values)))
- community_cards.arrange_submobjects(RIGHT)
+ community_cards.arrange(RIGHT)
deck = VGroup(*[
PlayingCard(turned_over = True)
for x in range(5)
@@ -239,9 +239,9 @@ class OneInOneThousandHaveDisease(Scene):
VGroup(*[
creature.copy()
for y in range(25)
- ]).arrange_submobjects(DOWN, SMALL_BUFF)
+ ]).arrange(DOWN, SMALL_BUFF)
for x in range(40)
- ]).arrange_submobjects(RIGHT, SMALL_BUFF)
+ ]).arrange(RIGHT, SMALL_BUFF)
all_creatures.set_width(FRAME_WIDTH - 4)
all_creatures.next_to(title, DOWN)
randy = all_creatures[0][0]
@@ -329,9 +329,9 @@ class TestNonDiseaseCase(TestScene):
VGroup(*[
randy.copy()
for y in range(10)
- ]).arrange_submobjects(DOWN)
+ ]).arrange(DOWN)
for y in range(10)
- ]).arrange_submobjects(RIGHT)
+ ]).arrange(RIGHT)
all_creatures.set_height(6)
all_creatures.to_corner(DOWN+LEFT)
last_guy = all_creatures[-1][-1]
@@ -414,7 +414,7 @@ class RephraseQuestion(Scene):
after testing positive.
""",
])))
- words.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ words.arrange(RIGHT, buff = LARGE_BUFF)
words.set_width(2*(FRAME_X_RADIUS - MED_LARGE_BUFF))
prior = TextMobject("Prior")
@@ -664,7 +664,7 @@ class ShowRestrictedSpace(Scene):
movers = VGroup(self.sick_one, *self.false_positives)
movers.generate_target()
movers.target.set_width(1)
- movers.target.arrange_submobjects(RIGHT)
+ movers.target.arrange(RIGHT)
movers.target.shift(DOWN)
brace = Brace(VGroup(*movers.target[1:]))
@@ -738,9 +738,9 @@ class ShowRestrictedSpace(Scene):
VGroup(*[
creature.copy()
for y in range(self.n_rows)
- ]).arrange_submobjects(DOWN, SMALL_BUFF)
+ ]).arrange(DOWN, SMALL_BUFF)
for x in range(self.n_cols)
- ]).arrange_submobjects(RIGHT, SMALL_BUFF)
+ ]).arrange(RIGHT, SMALL_BUFF)
all_creatures.set_height(5)
all_creatures.center().to_edge(LEFT)
@@ -769,9 +769,9 @@ class DepressingForMedicalTestDesigners(TestScene):
VGroup(*[
TexMobject("\\checkmark").set_color(GREEN)
for y in range(10)
- ]).arrange_submobjects(DOWN)
+ ]).arrange(DOWN)
for x in range(10)
- ]).arrange_submobjects(RIGHT)
+ ]).arrange(RIGHT)
cross = TexMobject("\\times")
cross.replace(checks[-1][-1])
cross.set_color(RED)
@@ -1007,7 +1007,7 @@ class SourceOfConfusion(Scene):
mob.set_color_by_tex("S", SICKLY_GREEN)
mob.set_color_by_tex("+", YELLOW)
progression = VGroup(prior, arrow, posterior)
- progression.arrange_submobjects(RIGHT)
+ progression.arrange(RIGHT)
progression.shift(DOWN)
bayes_rule_words = TextMobject("Bayes' rule")
diff --git a/active_projects/eop/chapter1/million_flips.py b/active_projects/eop/chapter1/million_flips.py
index 5e98f4a06..8f37c2c65 100644
--- a/active_projects/eop/chapter1/million_flips.py
+++ b/active_projects/eop/chapter1/million_flips.py
@@ -85,7 +85,7 @@ class MillionFlips(Scene):
self.wait()
def organize_group(self, group):
- group.arrange_submobjects_in_grid(10)
+ group.arrange_in_grid(10)
group.set_height(5)
group.shift(DOWN + 2 * LEFT)
diff --git a/active_projects/eop/chapter1/show_uncertainty_disease.py b/active_projects/eop/chapter1/show_uncertainty_disease.py
index 503fe1eb2..6d5b9d201 100644
--- a/active_projects/eop/chapter1/show_uncertainty_disease.py
+++ b/active_projects/eop/chapter1/show_uncertainty_disease.py
@@ -67,9 +67,9 @@ class OneIn200HasDisease(Scene):
VGroup(*[
creature.copy()
for y in range(20)
- ]).arrange_submobjects(DOWN, SMALL_BUFF)
+ ]).arrange(DOWN, SMALL_BUFF)
for x in range(10)
- ]).arrange_submobjects(RIGHT, SMALL_BUFF)
+ ]).arrange(RIGHT, SMALL_BUFF)
all_creatures.set_height(FRAME_HEIGHT * 0.8)
all_creatures.next_to(title, DOWN)
randy = all_creatures[0][0]
diff --git a/active_projects/eop/combinations.py b/active_projects/eop/combinations.py
index d7fa056b2..479ea7ab5 100644
--- a/active_projects/eop/combinations.py
+++ b/active_projects/eop/combinations.py
@@ -19,16 +19,16 @@ def get_stack(
term.add_to_back(fixed_start.copy())
if fixed_end:
term.add(fixed_end.copy())
- term.arrange_submobjects(RIGHT, buff = obj_to_obj_buff)
+ term.arrange(RIGHT, buff = obj_to_obj_buff)
stack.add(term)
- stack.arrange_submobjects(DOWN, buff = vertical_buff)
+ stack.arrange(DOWN, buff = vertical_buff)
return stack
def get_stacks(obj1, obj2, n, **kwargs):
stacks = VGroup()
for k in range(n+1):
stacks.add(get_stack(obj1, obj2, n, k, **kwargs))
- stacks.arrange_submobjects(
+ stacks.arrange(
RIGHT,
buff = MED_LARGE_BUFF,
aligned_edge = DOWN
@@ -235,7 +235,7 @@ class InitialFiveChooseThreeExample(Scene):
n_choose_k = TexMobject("n \\choose k")
n_choose_k_words = TextMobject("``n choose k''")
nCk_group = VGroup(n_choose_k, n_choose_k_words)
- nCk_group.arrange_submobjects(RIGHT)
+ nCk_group.arrange(RIGHT)
nCk_group.to_edge(UP)
binomials = VGroup(*[
@@ -247,7 +247,7 @@ class InitialFiveChooseThreeExample(Scene):
binomial.scale(0.75)
number = TexMobject(str(choose(n, k)))
equation = VGroup(binomial, TexMobject("="), number)
- equation.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ equation.arrange(RIGHT, buff = SMALL_BUFF)
equation.set_color(YELLOW)
equation[1].set_color(WHITE)
binomial_equations.add(equation)
@@ -332,7 +332,7 @@ class InitialFiveChooseThreeExample(Scene):
def count_ways_to_fill_slots(self):
lines = VGroup(*[Line(ORIGIN, 0.25*RIGHT) for x in range(5)])
- lines.arrange_submobjects(RIGHT)
+ lines.arrange(RIGHT)
lines.next_to(self.stacks[3], LEFT, LARGE_BUFF, UP)
self.play(ShowCreation(lines))
@@ -542,7 +542,7 @@ class SixChooseThreeInOtherContext(Scene):
def add_dots(self):
n = 4
dots = VGroup(*[Dot() for x in range(n**2)])
- dots.arrange_submobjects_in_grid(n, n, buff = LARGE_BUFF)
+ dots.arrange_in_grid(n, n, buff = LARGE_BUFF)
dots.next_to(ORIGIN, LEFT)
self.add(dots)
@@ -578,7 +578,7 @@ class SixChooseThreeInOtherContext(Scene):
group.add(arrow)
line = VGroup(*[arrow.tip.copy() for arrow in arrows])
- line.arrange_submobjects(RIGHT, buff = 0.5*SMALL_BUFF)
+ line.arrange(RIGHT, buff = 0.5*SMALL_BUFF)
if last_line is None:
line.shift(FRAME_X_RADIUS*RIGHT/2)
line.to_edge(UP)
@@ -611,7 +611,7 @@ class SixChooseThreeInOtherContext(Scene):
# symbol = TexMobject("n \\choose k")
# words = TextMobject("``n choose k''")
# group = VGroup(symbol, words)
-# group.arrange_submobjects(RIGHT)
+# group.arrange(RIGHT)
# self.play(
# FadeIn(symbol),
@@ -633,7 +633,7 @@ class SixChooseThreeInOtherContext(Scene):
# binomial.scale(0.75)
# number = TexMobject(str(choose(n, k)))
# equation = VGroup(binomial, TexMobject("="), number)
-# equation.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+# equation.arrange(RIGHT, buff = SMALL_BUFF)
# equation.set_color(YELLOW)
# equation[1].set_color(WHITE)
# binomial_equations.add(equation)
@@ -834,11 +834,11 @@ class SixChooseThreeInOtherContext(Scene):
# letter_subsets = list(it.combinations(letters, k))
# subset_mobs = VGroup(*[
-# VGroup(*letter_subset).copy().arrange_submobjects(
+# VGroup(*letter_subset).copy().arrange(
# RIGHT, buff = SMALL_BUFF
# )
# for letter_subset in letter_subsets
-# ]).arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+# ]).arrange(DOWN, buff = MED_SMALL_BUFF)
# subset_mobs.set_height(self.stack_height)
# subset_mobs.shift(FRAME_X_RADIUS*RIGHT/2)
# subset_mobs.to_edge(DOWN)
@@ -945,7 +945,7 @@ class SixChooseThreeInOtherContext(Scene):
# PlayingCard(value = value, suit = "hearts")
# for value in values
# ])
-# cards.arrange_submobjects(RIGHT)
+# cards.arrange(RIGHT)
# cards.to_corner(UP+RIGHT)
# words.next_to(cards, LEFT)
# words.shift_onto_screen()
@@ -982,7 +982,7 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
).set_color_by_tex(str(n), YELLOW)
for n in range(self.n_people_per_lineup+1)
])
- prob_words.arrange_submobjects(DOWN)
+ prob_words.arrange(DOWN)
prob_words.next_to(lineup_point, DOWN, MED_LARGE_BUFF)
def get_lineup():
@@ -1106,8 +1106,8 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
stacks.generate_target()
stacks.target.scale(0.75)
for stack in stacks.target:
- stack.arrange_submobjects(DOWN, buff = 1.5*SMALL_BUFF)
- stacks.target.arrange_submobjects(
+ stack.arrange(DOWN, buff = 1.5*SMALL_BUFF)
+ stacks.target.arrange(
RIGHT, buff = MED_LARGE_BUFF, aligned_edge = DOWN
)
stacks.target.to_edge(DOWN)
@@ -1141,7 +1141,7 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
str(len(stack))
)
equation[0].scale_in_place(0.6)
- equation.arrange_submobjects(RIGHT, SMALL_BUFF)
+ equation.arrange(RIGHT, SMALL_BUFF)
equation.set_color(YELLOW)
equation.set_color_by_tex("=", WHITE)
equation.next_to(stack, UP)
@@ -1251,7 +1251,7 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
Line(ORIGIN, self.item_line_width*RIGHT)
for mob in mobjects
])
- lines.arrange_submobjects(RIGHT, buff = buff)
+ lines.arrange(RIGHT, buff = buff)
items = VGroup()
for line, mob in zip(lines, mobjects):
item = VectorizedPoint() if mob is None else mob.copy()
@@ -1443,8 +1443,8 @@ class BuildFiveFromFour(ProbabilityOfKWomenInGroupOfFive):
stacks.generate_target()
stacks.target.scale(0.75)
for stack in stacks.target:
- stack.arrange_submobjects(DOWN, buff = SMALL_BUFF)
- stacks.target.arrange_submobjects(
+ stack.arrange(DOWN, buff = SMALL_BUFF)
+ stacks.target.arrange(
RIGHT, buff = MED_LARGE_BUFF, aligned_edge = DOWN
)
stacks.target.to_edge(DOWN, buff = MED_SMALL_BUFF)
@@ -1514,7 +1514,7 @@ class BuildFiveFromFour(ProbabilityOfKWomenInGroupOfFive):
group.add(point)
to_fade_in.add(lineup.items[-1])
new_stacks.add(new_stack)
- new_stacks.arrange_submobjects(
+ new_stacks.arrange(
RIGHT, buff = MED_LARGE_BUFF, aligned_edge = DOWN
)
new_stacks.move_to(stacks, DOWN)
@@ -1589,7 +1589,7 @@ class BuildFiveFromFour(ProbabilityOfKWomenInGroupOfFive):
top_stack.target.move_to(bottom_stack.get_top(), DOWN)
plus = TexMobject("+")
expr = VGroup(top_number.target, plus, bottom_number.target)
- expr.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ expr.arrange(RIGHT, buff = SMALL_BUFF)
expr.next_to(top_stack.target.get_top(), UP)
new_number = TexMobject(str(
@@ -1620,7 +1620,7 @@ class BuildUpFromStart(Scene):
}
def construct(self):
stacks = VGroup(VGroup(Male()), VGroup(Female()))
- stacks.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ stacks.arrange(RIGHT, buff = LARGE_BUFF)
stacks.numbers = self.get_numbers(stacks)
max_width = FRAME_WIDTH - 3
@@ -1662,7 +1662,7 @@ class BuildUpFromStart(Scene):
line.add(VectorizedPoint(line[-1].get_center()))
new_stack.add(new_line)
new_stacks.add(new_stack)
- new_stacks.arrange_submobjects(
+ new_stacks.arrange(
RIGHT, buff = LARGE_BUFF, aligned_edge = DOWN
)
if new_stacks.get_width() > max_width:
@@ -1705,7 +1705,7 @@ class BuildUpFromStart(Scene):
mover.generate_target()
plus = TexMobject("+")
expr = VGroup(top_num.target, plus, low_num.target)
- expr.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ expr.arrange(RIGHT, buff = SMALL_BUFF)
top_stack.target.next_to(low_stack, UP, buff = v_buff)
expr.next_to(top_stack.target, UP)
@@ -1927,7 +1927,7 @@ class IntroducePascalsTriangle(Scene):
nine_choose_four_term.target.scale(1./1.2)
over_512 = TexMobject("\\quad \\over 2^9")
frac = VGroup(nine_choose_four_term.target, over_512)
- frac.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ frac.arrange(DOWN, buff = SMALL_BUFF)
frac.next_to(expr, RIGHT, SMALL_BUFF)
eq_result = TexMobject("\\approx 0.246")
eq_result.next_to(frac, RIGHT)
@@ -1976,7 +1976,7 @@ class IntroducePascalsTriangle(Scene):
])
if n == 0:
line.add(Line(LEFT, RIGHT).scale(0.1).set_stroke(BLACK, 0))
- line.arrange_submobjects(RIGHT, SMALL_BUFF)
+ line.arrange(RIGHT, SMALL_BUFF)
line.shift(FRAME_X_RADIUS*RIGHT/2 + FRAME_Y_RADIUS*UP/2)
brace = Brace(line, UP)
if n == 1:
@@ -2215,10 +2215,10 @@ class ChooseThreeFromFive(InitialFiveChooseThreeExample, PiCreatureScene):
mover.target.set_height(self.stack[0].get_height())
for name in mover.target[:2]:
name[-1].set_fill(opacity = 1)
- mover.target.arrange_submobjects(RIGHT, MED_SMALL_BUFF)
+ mover.target.arrange(RIGHT, MED_SMALL_BUFF)
movers.add(mover)
movers.target.add(mover.target)
- movers.target.arrange_submobjects(
+ movers.target.arrange(
DOWN, buff = SMALL_BUFF,
aligned_edge = LEFT,
)
@@ -2300,7 +2300,7 @@ class ChooseThreeFromFive(InitialFiveChooseThreeExample, PiCreatureScene):
resorter = VGroup(*[
perm[i] for i in indices
])
- resorter.arrange_submobjects(RIGHT, MED_SMALL_BUFF)
+ resorter.arrange(RIGHT, MED_SMALL_BUFF)
resorter.next_to(updownarrow, DOWN)
permutations.add(perm)
@@ -2367,7 +2367,7 @@ class ChooseThreeFromFive(InitialFiveChooseThreeExample, PiCreatureScene):
line.generate_target()
resorter = VGroup(*line.target)
resorter.sort_submobjects(lambda p : random.random())
- resorter.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ resorter.arrange(RIGHT, buff = SMALL_BUFF)
resorter.move_to(line)
self.play(MoveToTarget(line, path_arc = np.pi))
self.play(FadeOut(q_marks))
@@ -2433,7 +2433,7 @@ class ChooseThreeFromFive(InitialFiveChooseThreeExample, PiCreatureScene):
PiCreature(color = color).scale(self.pi_creature_scale_val)
for color in self.people_colors
])
- people.arrange_submobjects(RIGHT)
+ people.arrange(RIGHT)
people.shift(3*LEFT)
people.to_edge(UP, buff = 1.25)
self.people = people
@@ -2627,7 +2627,7 @@ class StudentsGetConfused(PiCreatureScene):
for i, mob in enumerate(line):
mob.shift((i*width+SMALL_BUFF)*RIGHT)
line.scale(1.5)
- line.arrange_submobjects(RIGHT, SMALL_BUFF)
+ line.arrange(RIGHT, SMALL_BUFF)
line.move_to(self.pi_creatures, UP)
self.add(line)
@@ -2656,7 +2656,7 @@ class StudentsGetConfused(PiCreatureScene):
for color in (BLUE_D, BLUE_B)
])
pis[1].flip()
- pis.arrange_submobjects(RIGHT, buff = 5)
+ pis.arrange(RIGHT, buff = 5)
pis.to_edge(DOWN)
return pis
@@ -2766,7 +2766,7 @@ class HowToComputeNChooseK(ChooseThreeFromFive):
dots = VGroup(*[TexMobject("\\cdot") for x in range(k-1)])
product = VGroup(*it.chain(*list(zip(choice_numbers.target, dots))))
product.add(choice_numbers.target[-1])
- product.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ product.arrange(RIGHT, buff = SMALL_BUFF)
chosen_names_brace = Brace(chosen_names, UP)
product.next_to(chosen_names_brace, UP)
@@ -2839,7 +2839,7 @@ class HowToComputeNChooseK(ChooseThreeFromFive):
dots = VGroup(*[TexMobject("\\cdot") for x in range(k-1)])
product = VGroup(*it.chain(*list(zip(choice_numbers.target, dots))))
product.add(choice_numbers.target[-1])
- product.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ product.arrange(RIGHT, buff = SMALL_BUFF)
product.next_to(frac_line, DOWN, SMALL_BUFF)
self.play(
@@ -2888,12 +2888,12 @@ class HowToComputeNChooseK(ChooseThreeFromFive):
for triplet in it.permutations(ordered_triplet):
group = VGroup(*triplet).copy()
group.save_state()
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
line.add(group)
all_groups.add(group)
- line.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ line.arrange(RIGHT, buff = LARGE_BUFF)
lines.add(line)
- lines.arrange_submobjects(DOWN)
+ lines.arrange(DOWN)
lines.scale(0.8)
lines.to_edge(DOWN)
rects = VGroup(*[
@@ -2958,7 +2958,7 @@ class HowToComputeNChooseK(ChooseThreeFromFive):
)
for n0 in range(n, n-k, -1)
])
- choice_counts.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ choice_counts.arrange(RIGHT, buff = SMALL_BUFF)
choice_counts.set_color_by_gradient(*self.line_colors)
choice_counts.next_to(people_braces, DOWN)
return choice_counts
@@ -2981,7 +2981,7 @@ class HowToComputeNChooseK(ChooseThreeFromFive):
Line(ORIGIN, width*RIGHT)
for x in range(k)
])
- lines.arrange_submobjects(RIGHT)
+ lines.arrange(RIGHT)
lines.next_to(ORIGIN, DOWN, buff = LARGE_BUFF)
place_words = VGroup(*[
TexMobject("%d^\\text{%s}"%(i+1, s))
@@ -3052,7 +3052,7 @@ class NineChooseFourExample(HowToComputeNChooseK):
VGroup(*stack[(i*l)/n_stacks:((i+1)*l)/n_stacks])
for i in range(n_stacks)
])
- columns.arrange_submobjects(
+ columns.arrange(
RIGHT,
aligned_edge = UP,
buff = MED_LARGE_BUFF
@@ -3171,7 +3171,7 @@ class WeirdKindOfCancelation(TeacherStudentsScene):
names = VGroup(*list(map(TextMobject, [
"Ali", "Ben", "Cam", "Denis", "Evan"
])))
- names.arrange_submobjects(RIGHT)
+ names.arrange(RIGHT)
names.to_edge(UP, buff = LARGE_BUFF)
names.save_state()
lb, rb = braces = TexMobject("\\{\\}")
@@ -3181,7 +3181,7 @@ class WeirdKindOfCancelation(TeacherStudentsScene):
chosen_names = VGroup(*random.sample(names, 3))
chosen_names.generate_target()
- chosen_names.target.arrange_submobjects(RIGHT)
+ chosen_names.target.arrange(RIGHT)
chosen_names.target.next_to(top_numbers, UP, MED_LARGE_BUFF)
for name, name_target in zip(chosen_names, chosen_names.target):
name.target = name_target
@@ -3274,7 +3274,7 @@ class ShowFormula(Scene):
for i, j in (0, 2), (2, 13), (4, 0), (4, 3):
general_formula[i][j].set_color(YELLOW)
formulas = VGroup(specific_formula, general_formula)
- formulas.arrange_submobjects(DOWN, buff = 2)
+ formulas.arrange(DOWN, buff = 2)
formulas.to_edge(UP)
self.play(FadeIn(specific_formula))
@@ -3346,7 +3346,7 @@ class SumsToPowerOf2(Scene):
sum_group = VGroup(*it.chain(*list(zip(
numbers.target, plusses
))))
- sum_group.arrange_submobjects(RIGHT, SMALL_BUFF)
+ sum_group.arrange(RIGHT, SMALL_BUFF)
sum_group.next_to(numbers, UP, LARGE_BUFF)
sum_group.shift(MED_LARGE_BUFF*RIGHT)
@@ -3393,7 +3393,7 @@ class SumsToPowerOf2(Scene):
sum_group = VGroup(*it.chain(*list(zip(
fractions, plusses.target
))))
- sum_group.arrange_submobjects(RIGHT, buff = 2*SMALL_BUFF)
+ sum_group.arrange(RIGHT, buff = 2*SMALL_BUFF)
sum_group.next_to(rhs, LEFT)
sum_group.shift(0.5*SMALL_BUFF*DOWN)
@@ -3415,7 +3415,7 @@ class SumsToPowerOf2(Scene):
sum_group = VGroup(*it.chain(*list(zip(
fractions, plusses
))))
- sum_group.arrange_submobjects(RIGHT)
+ sum_group.arrange(RIGHT)
sum_group.next_to(
self.n_choose_k_terms, DOWN,
aligned_edge = LEFT, buff = LARGE_BUFF
@@ -3457,7 +3457,7 @@ class AskWhyTheyAreCalledBinomial(TeacherStudentsScene):
TexMobject("(x+y)^%d"%d)
for d in range(2, 7)
])
- example_binomials.arrange_submobjects(UP)
+ example_binomials.arrange(UP)
example_binomials.next_to(
self.teacher.get_corner(UP+LEFT), UP
)
diff --git a/active_projects/eop/independence.py b/active_projects/eop/independence.py
index 2ab785507..8aeb3ffb6 100644
--- a/active_projects/eop/independence.py
+++ b/active_projects/eop/independence.py
@@ -13,7 +13,7 @@ def get_quiz(*questions):
"%d. %s"%(i+1, question)
for i, question in enumerate(questions)
])))
- q_mobs.arrange_submobjects(
+ q_mobs.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT,
@@ -23,7 +23,7 @@ def get_quiz(*questions):
Line(q_mobs.get_left(), q_mobs.get_right()),
q_mobs
)
- content.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ content.arrange(DOWN, buff = MED_SMALL_BUFF)
rect = SurroundingRectangle(content, buff = MED_LARGE_BUFF)
rect.shift(MED_SMALL_BUFF*DOWN)
rect.set_color(WHITE)
@@ -60,7 +60,7 @@ def get_slot_group(
Line(ORIGIN, MED_LARGE_BUFF*RIGHT)
for x in range(n)
])
- lines.arrange_submobjects(RIGHT, buff = buff)
+ lines.arrange(RIGHT, buff = buff)
if include_qs:
labels = VGroup(*[
TextMobject("Q%d"%d) for d in range(1, n+1)
@@ -491,7 +491,7 @@ class IntroduceQuiz(PiCreatureScene):
]
]
for group in probabilities, abbreviated_probabilities:
- group.arrange_submobjects(
+ group.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -673,13 +673,13 @@ class AssociatePatternsWithScores(BreakDownQuestionPatterns):
score.set_color_by_tex("Score", GREEN)
scores.add(score)
score_group.organized = score_group.deepcopy()
- score_group.organized.arrange_submobjects(UP, buff = SMALL_BUFF)
+ score_group.organized.arrange(UP, buff = SMALL_BUFF)
score_group.organized.scale(self.score_group_scale_val)
brace = Brace(score_group.organized, LEFT)
score.next_to(brace, LEFT)
score.add(brace)
full_score_groups.add(VGroup(score, score_group.organized))
- full_score_groups.arrange_submobjects(
+ full_score_groups.arrange(
DOWN, buff = MED_LARGE_BUFF,
aligned_edge = RIGHT
)
@@ -783,7 +783,7 @@ class TemptingButWrongCalculation(BreakDownQuestionPatterns):
TexMobject("P(", "\\checkmark" if b else "\\times", ")")
for b in slot_group.bool_list
])
- rhs.arrange_submobjects(RIGHT, SMALL_BUFF)
+ rhs.arrange(RIGHT, SMALL_BUFF)
rhs.next_to(lhs, RIGHT, SMALL_BUFF)
for part, b in zip(rhs, slot_group.bool_list):
part.set_color_by_tex_to_color_map({
@@ -876,7 +876,7 @@ class ThousandPossibleQuizzes(Scene):
"Solve $\\zeta(s) = 0$",
),
)
- full_quizzes.arrange_submobjects(RIGHT)
+ full_quizzes.arrange(RIGHT)
target_quizzes = VGroup(*quizzes[:len(full_quizzes)])
for quiz in full_quizzes:
@@ -915,7 +915,7 @@ class ThousandPossibleQuizzes(Scene):
TexMobject(str(num)),
get_slot_group([b], buff = SMALL_BUFF, include_qs = False)
)
- label.arrange_submobjects(DOWN)
+ label.arrange(DOWN)
label.next_to(split.target, LEFT, buff = LARGE_BUFF)
labels.add(label)
@@ -945,7 +945,7 @@ class ThousandPossibleQuizzes(Scene):
TextMobject("Where are"), sg1,
TextMobject("and"), sg2, TextMobject("?"),
)
- question.arrange_submobjects(RIGHT, aligned_edge = DOWN)
+ question.arrange(RIGHT, aligned_edge = DOWN)
question[-1].next_to(question[-2], RIGHT, SMALL_BUFF)
question.next_to(top_split, UP, MED_LARGE_BUFF)
slot_groups.shift(SMALL_BUFF*DOWN)
@@ -984,7 +984,7 @@ class ThousandPossibleQuizzes(Scene):
TexMobject("(0.8)", "800 =", "640"),
get_slot_group([True, True], buff = SMALL_BUFF, include_qs = False)
)
- left_label.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ left_label.arrange(RIGHT, buff = MED_LARGE_BUFF)
left_label.next_to(left_split.target, UP)
self.play(
@@ -1062,7 +1062,7 @@ class ThousandPossibleQuizzes(Scene):
equation = TexMobject("(0.8)", "200 = ", "160")
slot_group = get_slot_group([False, True], buff = SMALL_BUFF, include_qs = False)
label = VGroup(equation, slot_group)
- label.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ label.arrange(DOWN, buff = SMALL_BUFF)
label.next_to(left_split.target, UP, SMALL_BUFF, LEFT)
alt_equation = TexMobject("(0.3)", "200 = ", "60")
for i in 0, 2:
@@ -1115,7 +1115,7 @@ class ThousandPossibleQuizzes(Scene):
slot_group = get_slot_group([True, True])
slot_group.content[0].set_fill(BLACK, 0)
label = VGroup(equation, slot_group)
- label.arrange_submobjects(DOWN)
+ label.arrange(DOWN)
label.next_to(self.quizzes, LEFT, LARGE_BUFF)
self.play(
@@ -1218,14 +1218,14 @@ class ThousandPossibleQuizzes(Scene):
)
for x in range(3)
])
- quiz.arrange_submobjects(RIGHT, buff = 0)
+ quiz.arrange(RIGHT, buff = 0)
quiz.set_stroke(width = 0)
quiz.set_fill(LIGHT_GREY, 1)
row = VGroup(*[quiz.copy() for y in range(self.n_quiz_cols)])
- row.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ row.arrange(RIGHT, buff = SMALL_BUFF)
rows.add(row)
- rows.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ rows.arrange(DOWN, buff = SMALL_BUFF)
quizzes = VGroup(*it.chain(*rows))
quizzes.set_height(self.quizzes_height)
quizzes.to_edge(RIGHT)
@@ -1261,7 +1261,7 @@ class HarderQuizzes(Scene):
"Prove from ZFC that $S \\notin S$.",
),
)
- quizzes.arrange_submobjects(RIGHT)
+ quizzes.arrange(RIGHT)
quizzes.to_edge(DOWN)
crosses = VGroup(*[
Cross(quiz.questions[0])
@@ -1330,7 +1330,7 @@ class AccurateProductRule(SampleSpaceScene, ThreeDScene):
p2 = TexMobject("P(", filler_tex, "|", filler_tex, ")")
p3 = TexMobject("P(", filler_tex, "|", filler_tex, ")")
terms = VGroup(lhs, p1, p2, p3)
- terms.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ terms.arrange(RIGHT, buff = SMALL_BUFF)
terms.to_edge(UP, buff = LARGE_BUFF)
kwargs = {"buff" : SMALL_BUFF, "include_qs" : False}
@@ -1512,7 +1512,7 @@ class ShowAllEightConditionals(Scene):
index = equation.index_of_part(part)
equation.submobjects[index] = slot_group
equations.add(equation)
- equations.arrange_submobjects(DOWN)
+ equations.arrange(DOWN)
rect = SurroundingRectangle(
VGroup(*equations[0][7:], *equations[-1][7:]),
@@ -1617,7 +1617,7 @@ class ComputeProbabilityOfOneWrong(Scene):
point_2s.add(*rhs.get_parts_by_tex("0.2"))
rhs.next_to(lhs, RIGHT)
probabilities.add(VGroup(lhs, rhs))
- probabilities.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ probabilities.arrange(DOWN, buff = LARGE_BUFF)
probabilities.center()
self.play(Write(probabilities[0]))
@@ -1696,7 +1696,7 @@ class ShowFullDistribution(Scene):
"=", "0.512",
),
)
- scores.arrange_submobjects(
+ scores.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -2071,7 +2071,7 @@ class CorrelationsWith35Percent(ThousandPossibleQuizzes):
get_probability_of_slot_group(2*[False], [False]),
get_probability_of_slot_group(3*[False], 2*[False]),
)
- equation.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ equation.arrange(RIGHT, buff = SMALL_BUFF)
equation.to_edge(UP)
self.add(equation)
@@ -2300,7 +2300,7 @@ class NameBinomial(Scene):
TexMobject("\\checkmark").set_color(GREEN)
for x in range(n)
])
- checkmarks.arrange_submobjects(DOWN, buff = 0.3)
+ checkmarks.arrange(DOWN, buff = 0.3)
crosses = VGroup()
arrows = VGroup()
for checkmark in checkmarks:
@@ -2654,7 +2654,7 @@ class ProbabilityOfAGivenBoyGirlPattern(CycleThroughPatterns):
factored_in_nums.add(num_mob)
factored.add(p_mob)
for group in factored, factored_in_nums:
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
group.next_to(prob, DOWN, MED_LARGE_BUFF)
gp_nums.save_state()
bp_nums.save_state()
@@ -2834,7 +2834,7 @@ class GeneralBinomialDistributionValues(Scene):
bars = self.chart.bars
bars.generate_target()
bars.save_state()
- bars.target.arrange_submobjects(UP, buff = 0)
+ bars.target.arrange(UP, buff = 0)
bars.target.stretch_to_fit_height(self.chart.height)
bars.target.move_to(
self.chart.x_axis.point_from_proportion(0.05),
@@ -3178,11 +3178,11 @@ class AssumeOrderDoesntMatter(Scene):
equals = TexMobject("=")
equals.next_to(prob, RIGHT)
prob.add(equals)
- prob_group.arrange_submobjects(RIGHT)
+ prob_group.arrange(RIGHT)
max_width = FRAME_WIDTH - 1
if prob_group.get_width() > max_width:
prob_group.set_width(max_width)
- prob_groups.arrange_submobjects(DOWN, buff = 0.7)
+ prob_groups.arrange(DOWN, buff = 0.7)
prob_groups.next_to(self.title, DOWN, MED_LARGE_BUFF)
self.play(FadeIn(
diff --git a/active_projects/shadows.py b/active_projects/shadows.py
index 1e8ea60cc..3dd58552f 100644
--- a/active_projects/shadows.py
+++ b/active_projects/shadows.py
@@ -106,7 +106,7 @@ class ShowShadows(ThreeDScene):
text = TextMobject("Shadow area: ")
decimal = DecimalNumber(0)
label = VGroup(text, decimal)
- label.arrange_submobjects(RIGHT)
+ label.arrange(RIGHT)
label.scale(1.5)
label.move_to(self.area_label_center - decimal.get_center())
self.shadow_area_label = label
@@ -132,7 +132,7 @@ class ShowShadows(ThreeDScene):
text = TextMobject("Surface area: ")
decimal = DecimalNumber(self.surface_area)
label = VGroup(text, decimal)
- label.arrange_submobjects(RIGHT)
+ label.arrange(RIGHT)
label.scale(1.25)
label.set_fill(YELLOW)
label.set_background_stroke(width=3)
diff --git a/example_scenes.py b/example_scenes.py
index d05e65954..1f91cbcbf 100644
--- a/example_scenes.py
+++ b/example_scenes.py
@@ -20,7 +20,7 @@ class OpeningManimExample(Scene):
"\\sum_{n=1}^\\infty "
"\\frac{1}{n^2} = \\frac{\\pi^2}{6}"
)
- VGroup(title, basel).arrange_submobjects(DOWN)
+ VGroup(title, basel).arrange(DOWN)
self.play(
Write(title),
FadeInFrom(basel, UP),
@@ -103,7 +103,7 @@ class WriteStuff(Scene):
"\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}",
)
group = VGroup(example_text, example_tex)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)
self.play(Write(example_text))
diff --git a/manimlib/for_3b1b_videos/common_scenes.py b/manimlib/for_3b1b_videos/common_scenes.py
index 6b6869068..ea98b9913 100644
--- a/manimlib/for_3b1b_videos/common_scenes.py
+++ b/manimlib/for_3b1b_videos/common_scenes.py
@@ -115,7 +115,7 @@ class PatreonThanks(Scene):
left_group = VGroup(*group[:len(group) / 2])
right_group = VGroup(*group[len(group) / 2:])
for subgroup, vect in (left_group, LEFT), (right_group, RIGHT):
- subgroup.arrange_submobjects(DOWN, aligned_edge=LEFT)
+ subgroup.arrange(DOWN, aligned_edge=LEFT)
subgroup.scale(self.patron_scale_val)
subgroup.to_edge(vect)
@@ -225,7 +225,7 @@ class PatreonEndScreen(PatreonThanks, PiCreatureScene):
for column in columns:
for n, name in enumerate(column):
name.shift(n * self.name_y_spacing * DOWN)
- columns.arrange_submobjects(
+ columns.arrange(
RIGHT, buff=LARGE_BUFF,
aligned_edge=UP,
)
@@ -321,7 +321,7 @@ class Banner(Scene):
def construct(self):
pis = self.get_pis()
pis.set_height(self.pi_height)
- pis.arrange_submobjects(RIGHT, aligned_edge=DOWN)
+ pis.arrange(RIGHT, aligned_edge=DOWN)
pis.move_to(self.pi_bottom, DOWN)
self.add(pis)
diff --git a/manimlib/for_3b1b_videos/pi_creature_scene.py b/manimlib/for_3b1b_videos/pi_creature_scene.py
index 865071111..a2ef4eea2 100644
--- a/manimlib/for_3b1b_videos/pi_creature_scene.py
+++ b/manimlib/for_3b1b_videos/pi_creature_scene.py
@@ -271,7 +271,7 @@ class TeacherStudentsScene(PiCreatureScene):
Randolph(color=c)
for c in self.student_colors
])
- self.students.arrange_submobjects(RIGHT)
+ self.students.arrange(RIGHT)
self.students.scale(self.student_scale_factor)
self.students.to_corner(DOWN + LEFT)
self.teacher.look_at(self.students[-1].eyes)
diff --git a/manimlib/mobject/mobject.py b/manimlib/mobject/mobject.py
index 283affbc4..117d9605f 100644
--- a/manimlib/mobject/mobject.py
+++ b/manimlib/mobject/mobject.py
@@ -852,14 +852,18 @@ class Mobject(Container):
def family_members_with_points(self):
return [m for m in self.get_family() if m.get_num_points() > 0]
- def arrange_submobjects(self, direction=RIGHT, center=True, **kwargs):
+ def arrange(self, direction=RIGHT, center=True, **kwargs):
for m1, m2 in zip(self.submobjects, self.submobjects[1:]):
m2.next_to(m1, direction, **kwargs)
if center:
self.center()
return self
- def arrange_submobjects_in_grid(self, n_rows=None, n_cols=None, **kwargs):
+ # Just here to keep from breaking old scenes.
+ def arrange_submobjects(self, *args, **kwargs):
+ return self.arrange(*args, **kwargs)
+
+ def arrange_in_grid(self, n_rows=None, n_cols=None, **kwargs):
submobs = self.submobjects
if n_rows is None and n_cols is None:
n_cols = int(np.sqrt(len(submobs)))
@@ -873,9 +877,9 @@ class Mobject(Container):
v2 = RIGHT
n = len(submobs) // n_cols
Group(*[
- Group(*submobs[i:i + n]).arrange_submobjects(v1, **kwargs)
+ Group(*submobs[i:i + n]).arrange(v1, **kwargs)
for i in range(0, len(submobs), n)
- ]).arrange_submobjects(v2, **kwargs)
+ ]).arrange(v2, **kwargs)
return self
def sort_submobjects(self, point_to_num_func=lambda p: p[0]):
diff --git a/manimlib/mobject/numbers.py b/manimlib/mobject/numbers.py
index 8ec82d9e3..eebee8d62 100644
--- a/manimlib/mobject/numbers.py
+++ b/manimlib/mobject/numbers.py
@@ -53,7 +53,7 @@ class DecimalNumber(VMobject):
self.unit_sign = SingleStringTexMobject(self.unit, color=self.color)
self.add(self.unit_sign)
- self.arrange_submobjects(
+ self.arrange(
buff=self.digit_to_digit_buff,
aligned_edge=DOWN
)
diff --git a/manimlib/mobject/svg/drawings.py b/manimlib/mobject/svg/drawings.py
index 20234d61c..a2802a653 100644
--- a/manimlib/mobject/svg/drawings.py
+++ b/manimlib/mobject/svg/drawings.py
@@ -230,9 +230,9 @@ class Laptop(VGroup):
VGroup(*[
Square(**self.key_color_kwargs)
for x in range(12 - y % 2)
- ]).arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ ]).arrange(RIGHT, buff=SMALL_BUFF)
for y in range(4)
- ]).arrange_submobjects(DOWN, buff=MED_SMALL_BUFF)
+ ]).arrange(DOWN, buff=MED_SMALL_BUFF)
keyboard.stretch_to_fit_width(
self.keyboard_width_to_body_width * body.get_width(),
)
@@ -316,7 +316,7 @@ class VideoSeries(VGroup):
digest_config(self, kwargs)
videos = [VideoIcon() for x in range(self.num_videos)]
VGroup.__init__(self, *videos, **kwargs)
- self.arrange_submobjects()
+ self.arrange()
self.set_width(FRAME_WIDTH - MED_LARGE_BUFF)
self.set_color_by_gradient(*self.gradient_colors)
diff --git a/manimlib/mobject/svg/tex_mobject.py b/manimlib/mobject/svg/tex_mobject.py
index 10893b622..4fdb2ba22 100644
--- a/manimlib/mobject/svg/tex_mobject.py
+++ b/manimlib/mobject/svg/tex_mobject.py
@@ -268,7 +268,7 @@ class BulletedList(TextMobject):
dot = TexMobject("\\cdot").scale(self.dot_scale_factor)
dot.next_to(part[0], LEFT, SMALL_BUFF)
part.add_to_back(dot)
- self.arrange_submobjects(
+ self.arrange(
DOWN,
aligned_edge=LEFT,
buff=self.buff
diff --git a/manimlib/once_useful_constructs/fractals.py b/manimlib/once_useful_constructs/fractals.py
index 3e6276425..0f5da995b 100644
--- a/manimlib/once_useful_constructs/fractals.py
+++ b/manimlib/once_useful_constructs/fractals.py
@@ -257,7 +257,7 @@ class WonkyHexagonFractal(SelfSimilarFractal):
piece.rotate(i * np.pi / 12, about_point=ORIGIN)
p1, p2, p3, p4, p5, p6, p7 = subparts
center_row = VGroup(p1, p4, p7)
- center_row.arrange_submobjects(RIGHT, buff=0)
+ center_row.arrange(RIGHT, buff=0)
for p in p2, p3, p5, p6:
p.set_width(p1.get_width())
p2.move_to(p1.get_top(), DOWN + LEFT)
diff --git a/manimlib/once_useful_constructs/matrix_multiplication.py b/manimlib/once_useful_constructs/matrix_multiplication.py
index 265349514..02700f911 100644
--- a/manimlib/once_useful_constructs/matrix_multiplication.py
+++ b/manimlib/once_useful_constructs/matrix_multiplication.py
@@ -82,7 +82,7 @@ class NumericalMatrixMultiplication(Scene):
def organize_matrices(self, left, right, result):
equals = TexMobject("=")
everything = VGroup(left, right, equals, result)
- everything.arrange_submobjects()
+ everything.arrange()
everything.set_width(FRAME_WIDTH - 1)
self.add(everything)
diff --git a/manimlib/scene/sample_space_scene.py b/manimlib/scene/sample_space_scene.py
index 77161834e..cc1c73f5f 100644
--- a/manimlib/scene/sample_space_scene.py
+++ b/manimlib/scene/sample_space_scene.py
@@ -33,7 +33,7 @@ class SampleSpaceScene(Scene):
for part, p in zip(parts.target, p_list):
part.replace(space_copy, stretch=True)
part.stretch(p, dimension)
- parts.target.arrange_submobjects(vect, buff=0)
+ parts.target.arrange(vect, buff=0)
parts.target.move_to(space_copy)
anims.append(MoveToTarget(parts))
if hasattr(parts, "labels") and parts.labels is not None:
@@ -106,7 +106,7 @@ class SampleSpaceScene(Scene):
rect.stretch_to_fit_width(
area / rect.get_height()
)
- post_rects.arrange_submobjects(DOWN, buff=0)
+ post_rects.arrange(DOWN, buff=0)
post_rects.next_to(
self.sample_space, RIGHT, buff
)
diff --git a/old_projects/256.py b/old_projects/256.py
index f7caecd25..e67b84430 100644
--- a/old_projects/256.py
+++ b/old_projects/256.py
@@ -138,7 +138,7 @@ class BreakUp2To256(PiCreatureScene):
)
for x in range(8)
])
- target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ target.arrange(RIGHT, buff = SMALL_BUFF)
target.to_edge(UP)
target.set_width(FRAME_WIDTH - LARGE_BUFF)
parens = VGroup(*it.chain(*[
@@ -210,7 +210,7 @@ class MainBreakdown(Scene):
)
top_line.add(mob)
four_billions.add(mob[1])
- top_line.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ top_line.arrange(RIGHT, buff = SMALL_BUFF)
top_line.set_width(FRAME_WIDTH - LARGE_BUFF)
top_line.to_edge(UP)
four_billions.set_color(YELLOW)
@@ -239,7 +239,7 @@ class MainBreakdown(Scene):
TextMobject("hash")
for x in range(10)
])
- hash_names.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ hash_names.arrange(DOWN, buff = MED_SMALL_BUFF)
hash_names.next_to(name, RIGHT, buff = 2)
paths = VGroup()
@@ -318,7 +318,7 @@ class MainBreakdown(Scene):
self.play(FadeIn(laptop))
self.play(
- gpus.arrange_submobjects, RIGHT, SMALL_BUFF,
+ gpus.arrange, RIGHT, SMALL_BUFF,
gpus.next_to, rate_words, UP,
gpus.to_edge, LEFT
)
@@ -560,13 +560,13 @@ class MainBreakdown(Scene):
VGroup(*[
mobject.copy().set_height(0.25)
for x in range(self.n_group_rows)
- ]).arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ ]).arrange(DOWN, buff = SMALL_BUFF)
for y in range(self.n_group_cols-1)
])
dots = TexMobject("\\dots")
group.add(dots)
group.add(*[group[0].copy() for x in range(2)])
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
group.set_height(FRAME_Y_RADIUS)
max_width = 1.25*FRAME_X_RADIUS
if group.get_width() > max_width:
@@ -811,9 +811,9 @@ class QAndA(PiCreatureScene):
dots = VGroup(*[
VGroup(*[
Dot() for x in range(rows)
- ]).arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ ]).arrange(DOWN, buff = SMALL_BUFF)
for y in range(cols)
- ]).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ]).arrange(RIGHT, buff = SMALL_BUFF)
dots.set_width(FRAME_WIDTH - 2*LARGE_BUFF)
dots.next_to(self.pi_creature, UP)
dots = VGroup(*it.chain(*dots))
diff --git a/old_projects/WindingNumber_G.py b/old_projects/WindingNumber_G.py
index 36e5cc24d..0aa946761 100644
--- a/old_projects/WindingNumber_G.py
+++ b/old_projects/WindingNumber_G.py
@@ -589,7 +589,7 @@ class TransitionFromEquationSolverToZeroFinder(Introduce1DFunctionCase):
fg_labels = VGroup(f_label, g_label)
fg_labels.generate_target()
- fg_labels.target.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ fg_labels.target.arrange(DOWN, aligned_edge = LEFT)
fg_labels.target.to_corner(UP+RIGHT)
new_equation = TexMobject("x^2", "-", "2", "=", "0")
@@ -679,7 +679,7 @@ class RewriteEquationWithTeacher(AltTeacherStudentsScene):
arg_separator = ""
)
complex_group = VGroup(complex_equation, z_def)
- complex_group.arrange_submobjects(DOWN)
+ complex_group.arrange(DOWN)
for tex in complex_group:
tex.set_color_by_tex("z", GREEN)
complex_group.move_to(self.hold_up_spot, DOWN)
@@ -1085,7 +1085,7 @@ class TwoDScreenInOurThreeDWorld(AltTeacherStudentsScene, ThreeDScene):
)
arrow.pointwise_become_partial(arrow, 0.0, 0.97)
group = VGroup(in_plane, arrow, out_plane)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
arrow.shift(UP)
group.move_to(self.students)
group.to_edge(UP)
@@ -1928,7 +1928,7 @@ class FailureOfComposition(ColorMappedObjectsScene):
Square(side_length = 2) for x in range(2)
])
small_squares.match_width(big_square, stretch = True)
- small_squares.arrange_submobjects(DOWN, buff = 0)
+ small_squares.arrange(DOWN, buff = 0)
small_squares.move_to(big_square)
small_squares.space_out_submobjects(1.1)
all_squares = VGroup(big_square, *small_squares)
@@ -1961,7 +1961,7 @@ class FailureOfComposition(ColorMappedObjectsScene):
no_answers_in_equation[1], equals,
yes_answers_in_equation
)
- equation.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ equation.arrange(RIGHT, buff = SMALL_BUFF)
equation.next_to(big_square, RIGHT, MED_LARGE_BUFF)
q_marks = TexMobject("???")
q_marks.next_to(equals, UP)
@@ -1972,7 +1972,7 @@ class FailureOfComposition(ColorMappedObjectsScene):
self.play(LaggedStart(Write, no_answers))
self.wait()
self.play(
- small_squares.arrange_submobjects, DOWN, {"buff" : 0},
+ small_squares.arrange, DOWN, {"buff" : 0},
small_squares.move_to, big_square,
no_answers.space_out_submobjects, 0.9,
)
@@ -2651,7 +2651,7 @@ class SearchSpacePerimeterVsArea(EquationSolver2d):
for path_target in path_parts.target:
if isinstance(path_target, Line):
path_target.rotate(-path_target.get_angle())
- path_parts.target.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ path_parts.target.arrange(DOWN, buff = MED_SMALL_BUFF)
alt_path_parts = path_parts.copy()
size = lambda m : m.get_height() + m.get_width()
alt_path_parts.submobjects.sort(
@@ -2901,7 +2901,7 @@ class AllOfTheVideos(Scene):
rect = SurroundingRectangle(image, buff = 0)
rect.set_stroke(WHITE, 1)
image.add(rect)
- images.arrange_submobjects_in_grid(n, n, buff = 0)
+ images.arrange_in_grid(n, n, buff = 0)
images.set_height(FRAME_HEIGHT)
random.shuffle(images.submobjects)
@@ -2952,7 +2952,7 @@ class MentionQAndA(Scene):
"What motivated you to join 3b1b?",
"$\\vdots$",
])))
- questions.arrange_submobjects(DOWN, buff = 0.75)
+ questions.arrange(DOWN, buff = 0.75)
questions.next_to(title, DOWN, LARGE_BUFF)
self.play(LaggedStart(FadeIn, questions, run_time = 3))
@@ -3002,7 +3002,7 @@ class InfiniteListOfTopics(Scene):
"Fixed points",
]
] + [TexMobject("\\vdots")])
- lines.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
+ lines.arrange(DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
lines.next_to(title, DOWN, MED_LARGE_BUFF)
lines[-1].next_to(lines[-2], DOWN)
@@ -3022,7 +3022,7 @@ class ManyIterations(Scene):
"Winding numbers, v5 \\\\ (start down wrong path)",
]
])
- words.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
+ words.arrange(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
words.scale(0.75)
words.to_edge(RIGHT)
@@ -3049,7 +3049,7 @@ class MentionFree(PiCreatureScene):
TextMobject("College course:", "$>\\$1{,}000.00$"),
TextMobject("YouTube video:", "$=\\$0.00$"),
)
- # items.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ # items.arrange(DOWN, buff = MED_LARGE_BUFF)
items.next_to(morty, UP, LARGE_BUFF)
right_x = morty.get_right()[0]
for item in items:
@@ -3185,7 +3185,7 @@ class PatreonScroll(Scene):
patrons = VGroup(*list(map(TextMobject, self.specific_patrons)))
patrons.scale(0.75)
random.shuffle(patrons.submobjects)
- patrons.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ patrons.arrange(DOWN, aligned_edge = LEFT)
patrons.next_to(ORIGIN, DOWN)
patrons.to_edge(RIGHT)
diff --git a/old_projects/alt_calc.py b/old_projects/alt_calc.py
index c3e93059c..a5c77a601 100644
--- a/old_projects/alt_calc.py
+++ b/old_projects/alt_calc.py
@@ -856,7 +856,7 @@ class GraphicalIntuitions(GraphScene):
)
for word in words:
word.add_background_rectangle()
- words.arrange_submobjects(DOWN)
+ words.arrange(DOWN)
words.to_edge(UP)
return LaggedStart(
FadeIn, words,
@@ -994,7 +994,7 @@ class MoreTopics(Scene):
)
for word in others:
word.add_background_rectangle()
- others.arrange_submobjects(
+ others.arrange(
DOWN, buff=MED_LARGE_BUFF, aligned_edge=LEFT,
)
others.next_to(RIGHT, RIGHT)
@@ -2129,7 +2129,7 @@ class IntroduceContinuedFractionPuzzle(PiCreatureScene):
tex_to_color_map={"x": YELLOW}
)
)
- fixed_point_words.arrange_submobjects(DOWN)
+ fixed_point_words.arrange(DOWN)
self.play(Write(x), Write(equals))
self.wait()
@@ -2432,7 +2432,7 @@ class ThinkAboutWithRepeatedApplication(IntroduceContinuedFractionPuzzle):
value = func(value)
value_labels.add(value_label)
- lines.arrange_submobjects(
+ lines.arrange(
DOWN, buff=MED_LARGE_BUFF,
)
VGroup(lines, value_labels).scale(0.8)
@@ -2566,7 +2566,7 @@ class ShowRepeatedApplication(Scene):
TexMobject("="),
get_nested_one_plus_one_over_x(1)
)
- title.arrange_submobjects(RIGHT)
+ title.arrange(RIGHT)
title.to_corner(UL)
title.set_color(self.title_color)
@@ -3420,7 +3420,7 @@ class TopicsAfterSingleVariable(PiCreatureScene, MoreTopics):
PiCreature(color=color)
for color in [BLUE_E, BLUE_C, BLUE_D]
])
- creatures.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ creatures.arrange(RIGHT, buff=LARGE_BUFF)
creatures.scale(0.5)
creatures.to_corner(DR)
return creatures
@@ -3544,7 +3544,7 @@ class PrinciplesOverlay(PiCreatureScene):
def construct(self):
morty = self.pi_creature
q_marks = VGroup(*[TexMobject("?") for x in range(40)])
- q_marks.arrange_submobjects_in_grid(4, 10)
+ q_marks.arrange_in_grid(4, 10)
q_marks.space_out_submobjects(1.4)
for mark in q_marks:
mark.shift(
diff --git a/old_projects/basel/basel2.py b/old_projects/basel/basel2.py
index af8100764..1fb14602a 100644
--- a/old_projects/basel/basel2.py
+++ b/old_projects/basel/basel2.py
@@ -671,7 +671,7 @@ class MathematicalWebOfConnections(PiCreatureScene):
formulas = VGroup(basel_sum, leibniz_sum, wallis_product)
formulas.scale(0.75)
- formulas.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ formulas.arrange(DOWN, buff = MED_LARGE_BUFF)
for formula in formulas:
basel_equals_x = basel_equals.get_center()[0]
formula_equals_x = formula.get_part_by_tex("=").get_center()[0]
@@ -1769,7 +1769,7 @@ class InverseSquareLaw(ThreeDScene):
n = int(distance)**2
copies = VGroup(*[new_screen.copy() for x in range(n)])
copies.rotate(-TAU/4, axis = UP)
- copies.arrange_submobjects_in_grid(buff = 0)
+ copies.arrange_in_grid(buff = 0)
copies.rotate(TAU/4, axis = UP)
copies.move_to(source_point, IN)
copies.shift(distance*RIGHT*unit_distance)
@@ -1890,7 +1890,7 @@ class OtherInstanceOfInverseSquareLaw(Scene):
"Heat", "Sound", "Radio waves", "Electric fields",
]
])
- items.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
+ items.arrange(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
items.next_to(h_line, DOWN, LARGE_BUFF)
items.to_edge(LEFT)
@@ -2393,7 +2393,7 @@ class SimpleIPTProof(Scene):
"{1 \\over ", "a^2}",
),
)
- argument_lines.arrange_submobjects(DOWN)
+ argument_lines.arrange(DOWN)
for line in argument_lines:
line.set_color_by_tex_to_color_map({
"a" : BLUE,
@@ -4397,9 +4397,9 @@ class Credits(Scene):
])
for credit, color in zip(credits, [MAROON_D, BLUE_D, WHITE]):
credit[1].set_color(color)
- credit.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ credit.arrange(DOWN, buff = SMALL_BUFF)
- credits.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ credits.arrange(DOWN, buff = LARGE_BUFF)
credits.center()
patreon_logo = PatreonLogo()
diff --git a/old_projects/bell.py b/old_projects/bell.py
index 98139f41e..e324dd252 100644
--- a/old_projects/bell.py
+++ b/old_projects/bell.py
@@ -555,7 +555,7 @@ class AngleToProbabilityChart(Scene):
TexMobject(str(angle) + "^\\circ")
for angle in angles
])
- angle_mobs.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ angle_mobs.arrange(DOWN, buff = MED_LARGE_BUFF)
angle_mobs.next_to(left_title, DOWN, LARGE_BUFF)
probs = [
@@ -1758,7 +1758,7 @@ class VennDiagramProofByContradiction(Scene):
),
TexMobject("+\\, N(", "A", "\\checkmark", ",", "B", ")"),
)
- terms.arrange_submobjects(RIGHT)
+ terms.arrange(RIGHT)
terms.to_edge(UP)
for term, index, group in zip(terms, [-3, -2, -2], photon_groups):
term.set_color_by_tex("checkmark", "#00ff00")
@@ -2201,7 +2201,7 @@ class ReEmphasizeVennDiagram(VennDiagramProofByContradiction):
TexMobject("N(", "B", "\\checkmark", ",", "C", ")"),
TexMobject("N(", "A", "\\checkmark", ",", "B", ")"),
)
- inequality.arrange_submobjects(RIGHT)
+ inequality.arrange(RIGHT)
for tex in inequality:
tex.set_color_by_tex("checkmark", "#00ff00")
if len(tex) > 1:
diff --git a/old_projects/borsuk.py b/old_projects/borsuk.py
index 6c87510ac..aff5d92fb 100644
--- a/old_projects/borsuk.py
+++ b/old_projects/borsuk.py
@@ -52,7 +52,7 @@ class Necklace(VMobject):
Jewel(color = color)
for color in self.colors
])
- jewels.arrange_submobjects(buff = self.jewel_buff)
+ jewels.arrange(buff = self.jewel_buff)
jewels.set_width(self.width)
jewels.center()
j_to_j_dist = (jewels[1].get_center()-jewels[0].get_center())[0]
@@ -149,7 +149,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
Randolph(),
Mortimer()
)
- thieves.arrange_submobjects(RIGHT, buff = 4*LARGE_BUFF)
+ thieves.arrange(RIGHT, buff = 4*LARGE_BUFF)
thieves.to_edge(DOWN)
thieves[0].make_eye_contact(thieves[1])
@@ -180,7 +180,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
jewel_copy.next_to(num_mob)
label = VGroup(num_mob, jewel_copy)
enumeration_labels.add(label)
- enumeration_labels.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ enumeration_labels.arrange(RIGHT, buff = LARGE_BUFF)
enumeration_labels.to_edge(UP)
self.play(
@@ -217,7 +217,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
)
jewel_type.save_state()
jewel_type.generate_target()
- jewel_type.target.arrange_submobjects()
+ jewel_type.target.arrange()
jewel_type.target.scale(2)
jewel_type.target.move_to(2*UP)
self.play(
@@ -246,9 +246,9 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
TexMobject(str(num/2)),
jewel.copy()
)
- half_label.arrange_submobjects()
+ half_label.arrange()
half_labels.add(half_label)
- half_labels.arrange_submobjects(DOWN)
+ half_labels.arrange(DOWN)
half_labels.set_height(thief.get_height())
half_labels.next_to(
thief, vect,
@@ -274,7 +274,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
VGroup(*jewel_type_copy[n_jewels/2:]),
]
for half, thief, vect in zip(halves, thieves, [RIGHT, LEFT]):
- half.arrange_submobjects(DOWN)
+ half.arrange(DOWN)
half.next_to(
thief, vect,
buff = SMALL_BUFF + type_index*half.get_width(),
@@ -1165,7 +1165,7 @@ class GeneralizeBorsukUlam(Scene):
plusses = [TexMobject("+") for x in range(self.n_dims-1)]
plusses += [TexMobject("=1")]
condition = VGroup(*it.chain(*list(zip(squares, plusses))))
- condition.arrange_submobjects(RIGHT)
+ condition.arrange(RIGHT)
return condition
@@ -1212,7 +1212,7 @@ class GeneralizeBorsukUlam(Scene):
f1, f2 = [TexMobject("f") for x in range(2)]
equals = TexMobject("=")
equation = VGroup(f1, tup, equals, f2, neg_tup)
- equation.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ equation.arrange(RIGHT, buff = SMALL_BUFF)
return equation
@@ -1298,7 +1298,7 @@ class MakeTwoJewelCaseContinuous(IntroduceStolenNecklaceProblem):
jewel_copy.next_to(num_mob)
label = VGroup(num_mob, jewel_copy)
enumeration_labels.add(label)
- enumeration_labels.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ enumeration_labels.arrange(RIGHT, buff = LARGE_BUFF)
enumeration_labels.to_edge(UP)
for jewel_type, label in zip(jewel_types, enumeration_labels):
@@ -1307,7 +1307,7 @@ class MakeTwoJewelCaseContinuous(IntroduceStolenNecklaceProblem):
jewel_type.save_state()
jewel_type.generate_target()
- jewel_type.target.arrange_submobjects()
+ jewel_type.target.arrange()
jewel_type.target.move_to(2*UP)
self.play(
MoveToTarget(jewel_type),
@@ -1502,10 +1502,10 @@ class MakeTwoJewelCaseContinuous(IntroduceStolenNecklaceProblem):
len(jewel_type)/2, len(self.segments)
)),
Jewel(color = jewel_type[0].get_color())
- ).arrange_submobjects()
+ ).arrange()
for jewel_type in self.jewel_types
])
- weight_description.arrange_submobjects(buff = LARGE_BUFF)
+ weight_description.arrange(buff = LARGE_BUFF)
weight_description.next_to(boxes, UP, aligned_edge = LEFT)
self.play(FadeIn(boxes))
@@ -1595,13 +1595,13 @@ class MakeTwoJewelCaseContinuous(IntroduceStolenNecklaceProblem):
emerald_segments.save_state()
emerald_segments.generate_target()
- emerald_segments.target.arrange_submobjects()
+ emerald_segments.target.arrange()
emerald_segments.target.move_to(2*DOWN)
brace = Brace(emerald_segments.target, DOWN)
label = VGroup(
TexMobject("5\\left( 1/18 \\right)"),
Jewel(color = self.jewel_colors[1])
- ).arrange_submobjects()
+ ).arrange()
label.next_to(brace, DOWN)
self.play(MoveToTarget(emerald_segments))
self.play(GrowFromCenter(brace))
@@ -1953,7 +1953,7 @@ class ChoicesForSpherePoint(GeneralizeBorsukUlam):
("z", "^2 = ", "1/2"),
])
])
- choices.arrange_submobjects(
+ choices.arrange(
DOWN,
buff = LARGE_BUFF,
aligned_edge = LEFT
@@ -1983,7 +1983,7 @@ class ChoicesForSpherePoint(GeneralizeBorsukUlam):
])
for sqrt in sqrts:
sqrt.scale(0.6)
- sqrts.arrange_submobjects(DOWN)
+ sqrts.arrange(DOWN)
sqrts.next_to(choice, RIGHT, buff = LARGE_BUFF)
sqrts.set_color(choice.get_color())
@@ -2223,13 +2223,13 @@ class TotalLengthOfEachJewelEquals(NecklaceDivisionSphereAssociation, ThreeDScen
for i, group in enumerate(monochrome_groups):
group.save_state()
group.generate_target()
- group.target.arrange_submobjects(buff = SMALL_BUFF)
+ group.target.arrange(buff = SMALL_BUFF)
brace = Brace(group.target, UP)
label = VGroup(
TextMobject("Thief %d"%(i+1)),
Jewel(color = group[0].get_color())
)
- label.arrange_submobjects()
+ label.arrange()
label.next_to(brace, UP)
full_group = VGroup(group.target, brace, label)
vect = LEFT if i == 0 else RIGHT
@@ -2530,7 +2530,7 @@ class CircleToSphereToQMarks(Scene):
))
pi_groups[-1].remove(pi_groups[-1][-1])
- pi_groups.arrange_submobjects(buff = -1)
+ pi_groups.arrange(buff = -1)
for mob in pi_groups:
self.play(FadeIn(mob))
self.wait(2)
diff --git a/old_projects/borsuk_addition.py b/old_projects/borsuk_addition.py
index 7c78944a4..612cc7694 100644
--- a/old_projects/borsuk_addition.py
+++ b/old_projects/borsuk_addition.py
@@ -154,7 +154,7 @@ class MapOfVideo(MovingCameraScene):
image.add(rect)
image_line = Group(*images[:2], *images[3:])
- image_line.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ image_line.arrange(RIGHT, buff=LARGE_BUFF)
images[2].next_to(image_line, DOWN, buff=1.5)
images.set_width(FRAME_WIDTH - 1)
images.to_edge(UP, buff=LARGE_BUFF)
@@ -211,7 +211,7 @@ class MathIsDeep(PiCreatureScene):
math.set_stroke(width=0, background=True)
numbers = [13, 1, 20, 8]
num_mobs = VGroup(*[Integer(d) for d in numbers])
- num_mobs.arrange_submobjects(RIGHT, buff=MED_LARGE_BUFF)
+ num_mobs.arrange(RIGHT, buff=MED_LARGE_BUFF)
num_mobs.next_to(math, DOWN, buff=1.5)
num_mobs.set_color(YELLOW)
top_arrows = VGroup(*[
@@ -269,9 +269,9 @@ class MinimizeSharding(Scene):
VGroup(*[
self.get_piece()
for x in range(3)
- ]).arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ ]).arrange(RIGHT, buff=SMALL_BUFF)
for y in range(4)
- ]).arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ ]).arrange(RIGHT, buff=SMALL_BUFF)
self.add(piece_groups)
self.play(*[
@@ -282,9 +282,9 @@ class MinimizeSharding(Scene):
group1 = piece_groups[:2]
group2 = piece_groups[2:]
self.play(
- group1.arrange_submobjects, DOWN,
+ group1.arrange, DOWN,
group1.next_to, ORIGIN, LEFT, LARGE_BUFF,
- group2.arrange_submobjects, DOWN,
+ group2.arrange, DOWN,
group2.next_to, ORIGIN, RIGHT, LARGE_BUFF,
)
self.wait()
@@ -341,12 +341,12 @@ class TopologyWordBreak(Scene):
signs.add(sign)
new_group.add(group[-1])
group.submobjects = list(new_group.submobjects)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
word[2].target.shift(0.1 * DOWN)
word[7].target.shift(0.1 * DOWN)
- classes.arrange_submobjects(DOWN, buff=LARGE_BUFF, aligned_edge=LEFT)
+ classes.arrange(DOWN, buff=LARGE_BUFF, aligned_edge=LEFT)
classes.shift(2 * RIGHT)
genus_labels = VGroup(*[
@@ -461,7 +461,7 @@ class FunctionGInSymbols(Scene):
f_of_neg_p.generate_target()
f_of_p.generate_target()
group = VGroup(f_of_p.target, minus, f_of_neg_p.target)
- group.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ group.arrange(RIGHT, buff=SMALL_BUFF)
group.next_to(equals, LEFT)
self.play(
@@ -488,7 +488,7 @@ class FunctionGInSymbols(Scene):
g_of_p.copy(), equals, zero_zero
)
g_equals_zero.generate_target()
- g_equals_zero.target.arrange_submobjects(RIGHT, SMALL_BUFF)
+ g_equals_zero.target.arrange(RIGHT, SMALL_BUFF)
g_equals_zero.target.next_to(seeking_text, DOWN)
self.play(
diff --git a/old_projects/clacks/question.py b/old_projects/clacks/question.py
index 362315767..7bd6a9c09 100644
--- a/old_projects/clacks/question.py
+++ b/old_projects/clacks/question.py
@@ -441,7 +441,7 @@ class MathAndPhysicsConspiring(Scene):
TexMobject("\\pi = {:.16}\\dots".format(PI)),
self.get_tangent_image(),
)
- math_stuffs.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF)
+ math_stuffs.arrange(DOWN, buff=MED_LARGE_BUFF)
math_stuffs.next_to(math_title, DOWN, LARGE_BUFF)
to_fade = VGroup(math_title, *math_stuffs, physics_title)
@@ -1003,7 +1003,7 @@ class PiComputingAlgorithmsAxes(Scene):
class StepsOfTheAlgorithm(TeacherStudentsScene):
def construct(self):
steps = self.get_steps()
- steps.arrange_submobjects(
+ steps.arrange(
DOWN,
buff=MED_LARGE_BUFF,
aligned_edge=LEFT,
@@ -1127,7 +1127,7 @@ class CompareToGalacticMass(Scene):
digits_word.match_color(counter)
counter.generate_target()
group = VGroup(counter.target, digits_word)
- group.arrange_submobjects(
+ group.arrange(
RIGHT,
index_of_submobject_to_align=0,
aligned_edge=DOWN,
@@ -1219,7 +1219,7 @@ class CompareToGalacticMass(Scene):
black_holes = VGroup(*[
black_hole.copy() for k in range(10)
])
- black_holes.arrange_submobjects_in_grid(5, 2)
+ black_holes.arrange_in_grid(5, 2)
black_holes.to_corner(DR)
random.shuffle(black_holes.submobjects)
for bh in black_holes:
@@ -1446,7 +1446,7 @@ class NextVideo(Scene):
for video in videos:
video.set_color(BLUE)
video.set_sheen(0.5, UL)
- videos.arrange_submobjects(RIGHT, buff=2)
+ videos.arrange(RIGHT, buff=2)
titles = VGroup(
TextMobject("Here and now"),
@@ -1479,7 +1479,7 @@ class NextVideo(Scene):
Mortimer()
)
friends.set_height(1)
- friends.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ friends.arrange(RIGHT, buff=MED_SMALL_BUFF)
friends[:2].next_to(randy, LEFT)
friends[2].next_to(randy, RIGHT)
diff --git a/old_projects/clacks/solution1.py b/old_projects/clacks/solution1.py
index 9b1839ba5..25068ef43 100644
--- a/old_projects/clacks/solution1.py
+++ b/old_projects/clacks/solution1.py
@@ -14,7 +14,7 @@ class FromPuzzleToSolution(MovingCameraScene):
rects = VGroup(ScreenRectangle(), ScreenRectangle())
rects.set_height(3)
- rects.arrange_submobjects(RIGHT, buff=2)
+ rects.arrange(RIGHT, buff=2)
titles = VGroup(
TextMobject("Puzzle"),
@@ -546,7 +546,7 @@ class AskAboutFindingNewVelocities(Scene):
TexMobject("v_1 = {:.2f}".format(v1)),
TexMobject("v_2 = {:.2f}".format(v2)),
)
- labels.arrange_submobjects(
+ labels.arrange(
DOWN,
buff=MED_SMALL_BUFF,
aligned_edge=LEFT,
@@ -665,7 +665,7 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities):
def show_two_equations(self):
equations = self.get_energy_and_momentum_expressions()
- equations.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ equations.arrange(DOWN, buff=LARGE_BUFF)
equations.shift(UP)
v1_terms, v2_terms = v_terms = VGroup(*[
VGroup(*[
@@ -1457,7 +1457,7 @@ class AnalyzeCircleGeometry(CircleDiagramFromSlidingBlocks, MovingCameraScene):
)))
movers.remove(movers[-1])
mover_targets = VGroup(*[mover.target for mover in movers])
- mover_targets.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ mover_targets.arrange(RIGHT, buff=SMALL_BUFF)
mover_targets.next_to(ORIGIN, DOWN)
mover_targets.to_edge(LEFT)
@@ -2255,7 +2255,7 @@ class ThetaChart(Scene):
TextMobject("$\\theta$ value"),
])
titles.scale(1.5)
- titles.arrange_submobjects(RIGHT, buff=1.5)
+ titles.arrange(RIGHT, buff=1.5)
titles[1].shift(MED_SMALL_BUFF * LEFT)
titles[2].shift(MED_SMALL_BUFF * RIGHT)
titles.to_corner(UL)
@@ -2900,7 +2900,7 @@ class ConservationLawSummary(Scene):
equation.set_color_by_tex("m_", BLUE)
equation.set_color_by_tex("v_", RED)
- words.arrange_submobjects(
+ words.arrange(
DOWN, buff=3,
)
words.to_edge(LEFT, buff=1.5)
@@ -2969,7 +2969,7 @@ class FinalCommentsOnPhaseSpace(Scene):
stroke_width=5,
buff=0,
))
- images.arrange_submobjects(RIGHT)
+ images.arrange(RIGHT)
images.move_to(DOWN)
arrows = VGroup(*[
@@ -3006,7 +3006,7 @@ class FinalCommentsOnPhaseSpace(Scene):
word.scale(2)
group = VGroup(state, arrow, point)
- group.arrange_submobjects(RIGHT, buff=MED_LARGE_BUFF)
+ group.arrange(RIGHT, buff=MED_LARGE_BUFF)
group.move_to(2.5 * DOWN)
dynamics.move_to(state, RIGHT)
diff --git a/old_projects/clacks/solution2/mirror_scenes.py b/old_projects/clacks/solution2/mirror_scenes.py
index 7999e65ad..84f6f0beb 100644
--- a/old_projects/clacks/solution2/mirror_scenes.py
+++ b/old_projects/clacks/solution2/mirror_scenes.py
@@ -78,7 +78,7 @@ class MirrorScene(Scene):
Line(ORIGIN, 2 * RIGHT),
Line(ORIGIN, (self.line_length - 4) * RIGHT),
)
- mirror.arrange_submobjects(RIGHT, buff=0)
+ mirror.arrange(RIGHT, buff=0)
mirror.set_stroke(width=5)
mirror[0::2].set_stroke((WHITE, GREY))
mirror[1::2].set_stroke((GREY, WHITE))
@@ -235,7 +235,7 @@ class MirrorScene(Scene):
)
)
group = VGroup(lhs, radians, radians_word, equals, degrees)
- group.arrange_submobjects(RIGHT, aligned_edge=DOWN)
+ group.arrange(RIGHT, aligned_edge=DOWN)
equals.align_to(lhs[-1], DOWN)
group.to_corner(UL)
return group
diff --git a/old_projects/clacks/solution2/position_phase_space.py b/old_projects/clacks/solution2/position_phase_space.py
index 6cb2d712c..a26fbcfbf 100644
--- a/old_projects/clacks/solution2/position_phase_space.py
+++ b/old_projects/clacks/solution2/position_phase_space.py
@@ -1173,7 +1173,7 @@ class FailedAngleRelation(PositionPhaseSpaceScene):
TexMobject("\\ne").rotate(90 * DEGREES),
TextMobject("Angle of reflection")
)
- result.arrange_submobjects(DOWN)
+ result.arrange(DOWN)
result.set_stroke(BLACK, 5, background=True)
return result
@@ -1266,7 +1266,7 @@ class RescaleCoordinates(PositionPhaseSpaceScene, MovingCameraScene):
block.label.copy(),
)
group.generate_target()
- group.target.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ group.target.arrange(RIGHT, buff=SMALL_BUFF)
group.target.next_to(block, vect)
group[1].scale(0)
group[1].move_to(group.target[1])
@@ -1714,7 +1714,7 @@ class IntroduceVelocityVector(PositionPhaseSpaceScene, MovingCameraScene):
magnitude_bars[0], big_ps_vect,
magnitude_bars[1], rhs
)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.next_to(corner_rect.get_corner(UL), DR)
new_rhs = TexMobject(
@@ -1863,7 +1863,7 @@ class ShowMomentumConservation(IntroduceVelocityVector):
new_eq[2][2:].set_color(BLUE)
new_eq.submobjects = [new_eq[i] for i in [0, 1, 3, 2, 4]]
- eqs_targets.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ eqs_targets.arrange(DOWN, buff=LARGE_BUFF)
eqs_targets.move_to(RIGHT).to_edge(UP)
for eq, new_eq in zip(eqs_targets, new_eqs):
new_eq.move_to(eq)
@@ -1891,11 +1891,11 @@ class ShowMomentumConservation(IntroduceVelocityVector):
x_eq.target[4],
x_eq.target[3],
x_eq.target[:3],
- ).arrange_submobjects(RIGHT)
+ ).arrange(RIGHT)
for p1, p2 in zip(x_eq, x_eq.target):
p2.align_to(p1, DOWN)
group = VGroup(y_eq.target, equals, x_eq.target)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
x_eq.target.align_to(y_eq.target, DOWN)
equals.align_to(y_eq.target[3], DOWN)
group.to_edge(UP, buff=MED_SMALL_BUFF)
@@ -2347,7 +2347,7 @@ class ShowMomentumConservation(IntroduceVelocityVector):
dot_product = VGroup(
sqrty_m, dot, deriv_array, rhs
)
- dot_product.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ dot_product.arrange(RIGHT, buff=SMALL_BUFF)
return dot_product
diff --git a/old_projects/clacks/solution2/simple_scenes.py b/old_projects/clacks/solution2/simple_scenes.py
index d7718ff9b..a0a81a352 100644
--- a/old_projects/clacks/solution2/simple_scenes.py
+++ b/old_projects/clacks/solution2/simple_scenes.py
@@ -438,7 +438,7 @@ class AskAboutAddingThetaToItself(Scene):
eq, value,
ineq, pi
)
- group.arrange_submobjects(RIGHT, buff=0.2)
+ group.arrange(RIGHT, buff=0.2)
group.next_to(ORIGIN, DOWN, buff=LARGE_BUFF)
theta_brace = Brace(group[2], DOWN, buff=SMALL_BUFF)
theta_symbol = theta_brace.get_tex("\\theta")
@@ -508,7 +508,7 @@ class FinalFormula(Scene):
)
formula.set_color_by_tex_to_color_map(t2c_map)
group = VGroup(text, formula)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.scale(1.5)
group.to_edge(UP)
@@ -556,7 +556,7 @@ class TwoSolutionsWrapper(WrapperScene):
self.get_screen_rect(height=3)
for x in range(2)
])
- screen_rects.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ screen_rects.arrange(RIGHT, buff=LARGE_BUFF)
title = TextMobject("Two solutions")
title.scale(1.5)
title.to_edge(UP)
@@ -570,7 +570,7 @@ class TwoSolutionsWrapper(WrapperScene):
Mortimer().scale(1.2)
)
pis.set_height(2)
- pis.arrange_submobjects(RIGHT, buff=MED_LARGE_BUFF)
+ pis.arrange(RIGHT, buff=MED_LARGE_BUFF)
pis.to_edge(DOWN, buff=SMALL_BUFF)
self.add(big_rect, title, pis)
diff --git a/old_projects/clacks/solution2/wordy_scenes.py b/old_projects/clacks/solution2/wordy_scenes.py
index 2be0cce22..2a89d9e8e 100644
--- a/old_projects/clacks/solution2/wordy_scenes.py
+++ b/old_projects/clacks/solution2/wordy_scenes.py
@@ -94,9 +94,9 @@ class ConnectionToOptics(Scene):
momentum_group = VGroup(momentum_label, momentum_eq)
groups = VGroup(energy_group, momentum_group)
for group in groups:
- group.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF)
+ group.arrange(DOWN, buff=MED_LARGE_BUFF)
group[0].set_color(GREEN)
- groups.arrange_submobjects(DOWN, buff=2)
+ groups.arrange(DOWN, buff=2)
groups.to_edge(LEFT)
return groups
@@ -147,7 +147,7 @@ class ConnectionToOptics(Scene):
"Angle of\\\\Incidence",
"=",
"Angle of\\\\Reflection",
- ])).arrange_submobjects(RIGHT)
+ ])).arrange(RIGHT)
title.set_color(YELLOW)
h_line = Line(LEFT, RIGHT)
h_line.match_width(title)
diff --git a/old_projects/crypto.py b/old_projects/crypto.py
index b8e9afbe2..20b6a390d 100644
--- a/old_projects/crypto.py
+++ b/old_projects/crypto.py
@@ -22,7 +22,7 @@ def bit_string_to_mobject(bit_string):
pre_result = VGroup(*[
line.copy() for row in range(8)
])
- pre_result.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ pre_result.arrange(DOWN, buff = SMALL_BUFF)
result = VGroup(*it.chain(*pre_result))
result.scale(0.7)
bit_string = (256 - len(bit_string))*"0" + bit_string
@@ -143,7 +143,7 @@ class ListOfAttributes(Scene):
for word in ("government", "bank")
]
attributes = VGroup(digital, *buildings)
- attributes.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ attributes.arrange(RIGHT, buff = LARGE_BUFF)
for building in buildings:
building.cross = Cross(building)
building.cross.set_stroke(width = 12)
@@ -278,7 +278,7 @@ class ListRecentCurrencies(Scene):
)
for logo in logos:
logo.set_height(0.75)
- logos.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ logos.arrange(DOWN, buff = MED_LARGE_BUFF)
logos.shift(LEFT)
logos.to_edge(UP)
names = list(map(
@@ -577,7 +577,7 @@ class LayOutPlan(LedgerScene):
def ask_question(self):
btc = BitcoinLogo()
group = VGroup(btc, TexMobject("= ???"))
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
self.play(
DrawBorderThenFill(btc),
@@ -813,7 +813,7 @@ class IntroduceLedgerSystem(LedgerScene):
]
self.play(FadeIn(debtor_cash))
self.play(
- debtor_cash.arrange_submobjects, RIGHT, SMALL_BUFF,
+ debtor_cash.arrange, RIGHT, SMALL_BUFF,
debtor_cash.move_to, self.pi_creatures,
)
self.wait()
@@ -1015,7 +1015,7 @@ class DescribeDigitalSignatures(LedgerScene):
VGroup(pi, pi.label).scale(1.7)
for pi in self.pi_creatures
])
- creature_groups.arrange_submobjects(RIGHT, buff = 2)
+ creature_groups.arrange(RIGHT, buff = 2)
creature_groups.to_edge(DOWN)
self.add(creature_groups)
for pi in self.pi_creatures:
@@ -1052,7 +1052,7 @@ class DescribeDigitalSignatures(LedgerScene):
]
]
key_pairs = [
- VGroup(*pair).arrange_submobjects(DOWN, aligned_edge = LEFT)
+ VGroup(*pair).arrange(DOWN, aligned_edge = LEFT)
for pair in zip(public_keys, private_keys)
]
for key_pair, pi in zip(key_pairs, self.pi_creatures):
@@ -1107,7 +1107,7 @@ class DescribeDigitalSignatures(LedgerScene):
def show_handwritten_signatures(self):
lines = VGroup(*[Line(LEFT, RIGHT) for x in range(5)])
- lines.arrange_submobjects(DOWN)
+ lines.arrange(DOWN)
last_line = lines[-1]
last_line.scale(0.7, about_point = last_line.get_left())
@@ -1129,7 +1129,7 @@ class DescribeDigitalSignatures(LedgerScene):
document.copy()
for x in range(2)
])
- documents.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ documents.arrange(RIGHT, buff = MED_LARGE_BUFF)
documents.to_corner(UP+LEFT)
signatures = VGroup()
@@ -1178,7 +1178,7 @@ class DescribeDigitalSignatures(LedgerScene):
TextMobject,
["Different messages", "Completely different signatures"]
)))
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.scale(1.3)
words.next_to(self.documents, RIGHT)
@@ -1285,7 +1285,7 @@ class TryGuessingDigitalSignature(Scene):
zeros_row = TexMobject("0"*32)
zeros = VGroup(*[zeros_row.copy() for x in range(8)])
- zeros.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ zeros.arrange(DOWN, buff = SMALL_BUFF)
zeros.next_to(brace, UP)
self.add(verify)
@@ -1456,7 +1456,7 @@ class IncludeTransactionNumber(LedgerScene):
def copy_payment_many_times(self):
line = self.ledger.content[-1]
copies = VGroup(*[line.copy() for x in range(4)])
- copies.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ copies.arrange(DOWN, buff = MED_SMALL_BUFF)
copies.next_to(line, DOWN, buff = MED_SMALL_BUFF)
self.play(
@@ -1973,7 +1973,7 @@ class BitcoinIsALedger(Scene):
ledger = self.get_ledger()
arrow = TexMobject("\\Leftrightarrow")
group = VGroup(logo, arrow, ledger)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
self.play(DrawBorderThenFill(logo))
self.wait()
@@ -2009,7 +2009,7 @@ class BitcoinIsALedger(Scene):
Line(LEFT, RIGHT)
for x in range(8)
])
- lines.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ lines.arrange(DOWN, buff = SMALL_BUFF)
lines.stretch_to_fit_width(title.get_width())
lines.next_to(title, DOWN)
return VGroup(rect, title, lines)
@@ -2062,7 +2062,7 @@ class DistributedLedgerScene(LedgerScene):
title.next_to(ledger.get_top(), DOWN, MED_LARGE_BUFF)
h_line.next_to(title, DOWN)
added_lines = VGroup(*[h_line.copy() for x in range(5)])
- added_lines.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ added_lines.arrange(DOWN, buff = MED_LARGE_BUFF)
added_lines.next_to(h_line, DOWN, MED_LARGE_BUFF)
ledger.content.add(added_lines)
@@ -2216,7 +2216,7 @@ class TransitionToDistributedLedger(DistributedLedgerScene):
self.play(
FadeOut(self.network),
ledgers.scale, 2,
- ledgers.arrange_submobjects, RIGHT,
+ ledgers.arrange, RIGHT,
ledgers.space_out_submobjects,
)
@@ -2244,7 +2244,7 @@ class BobDoubtsBroadcastTransaction(DistributedLedgerScene):
for pi in self.pi_creatures:
pi.flip()
self.pi_creatures.scale(2)
- self.pi_creatures.arrange_submobjects(RIGHT, buff = 5)
+ self.pi_creatures.arrange(RIGHT, buff = 5)
for name in "bob", "charlie":
label = TextMobject(name.capitalize())
@@ -2676,7 +2676,7 @@ class SHA256ToProofOfWork(TeacherStudentsScene):
proof = TextMobject("Proof of work")
arrow = Arrow(LEFT, RIGHT)
group = VGroup(sha, arrow, proof)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.next_to(self.teacher, UP, buff = LARGE_BUFF)
group.to_edge(RIGHT, buff = LARGE_BUFF)
@@ -2952,7 +2952,7 @@ class IntroduceBlockChain(Scene):
blocks = VGroup(*[
self.get_block() for x in range(3)
])
- blocks.arrange_submobjects(RIGHT, buff = 1.5)
+ blocks.arrange(RIGHT, buff = 1.5)
blocks.to_edge(UP)
all_payments = VGroup()
@@ -3208,7 +3208,7 @@ class IntroduceBlockChain(Scene):
payments.add(payment)
self.transaction_counter += 1
payments.add(TexMobject("\\dots").scale(0.5))
- payments.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ payments.arrange(DOWN, buff = MED_SMALL_BUFF)
payments.next_to(h_line1, DOWN)
proof_of_work = TextMobject("Proof of work")
@@ -3259,7 +3259,7 @@ class DistributedBlockChainScene(DistributedLedgerScene):
self.get_block()
for x in range(self.n_blocks)
])
- blocks.arrange_submobjects(RIGHT, buff = MED_SMALL_BUFF)
+ blocks.arrange(RIGHT, buff = MED_SMALL_BUFF)
arrows = VGroup()
for b1, b2 in zip(blocks, blocks[1:]):
@@ -3439,7 +3439,7 @@ class IntroduceBlockCreator(DistributedBlockChainScene):
block_creators.add(block_creator)
labels.add(label)
everything.add(VGroup(block_creator, label))
- everything.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ everything.arrange(DOWN, buff = LARGE_BUFF)
everything.to_edge(LEFT)
self.play(LaggedStart(FadeIn, everything))
@@ -3478,7 +3478,7 @@ class IntroduceBlockCreator(DistributedBlockChainScene):
payment.set_fill(opacity = 0)
payment.move_to(pi)
payments.add(payment)
- payment_targets.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ payment_targets.arrange(DOWN, aligned_edge = LEFT)
payment_targets.next_to(
self.block_creator_labels, RIGHT,
MED_LARGE_BUFF
@@ -3596,7 +3596,7 @@ class IntroduceBlockCreator(DistributedBlockChainScene):
"- No sender/signature",
"- Adds to total money supply",
])))
- comments.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ comments.arrange(DOWN, aligned_edge = LEFT)
comments.move_to(big_rect, UP+LEFT)
pi_creatures = self.pi_creatures
@@ -3688,7 +3688,7 @@ class MiningIsALottery(IntroduceBlockCreator):
for n in range(self.n_miners)
])
miners.scale(0.5)
- miners.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ miners.arrange(DOWN, buff = LARGE_BUFF)
miners.to_edge(LEFT)
for x, miner in enumerate(miners):
label = TextMobject("Miner %d"%(x+1))
@@ -3809,7 +3809,7 @@ class MiningIsALottery(IntroduceBlockCreator):
lines.add(TexMobject("\\vdots"))
for line in lines:
line.set_height(0.5)
- lines.arrange_submobjects(
+ lines.arrange(
DOWN, buff = SMALL_BUFF, aligned_edge = LEFT
)
lines[-1].next_to(lines[-2], DOWN, buff = SMALL_BUFF)
@@ -3927,7 +3927,7 @@ class TwoBlockChains(DistributedBlockChainScene):
arrow_block = VGroup(arrow, block).copy()
block_chains.generate_target()
- block_chains.target.arrange_submobjects(
+ block_chains.target.arrange(
DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT
)
block_chains.target.next_to(randy, UP)
@@ -4114,7 +4114,7 @@ class DoubleSpendingAttack(DistributedBlockChainScene):
payment,
TexMobject("\\vdots")
)
- payments.arrange_submobjects(DOWN)
+ payments.arrange(DOWN)
payments.set_width(0.9*block.get_width())
payments.move_to(block)
content.add(payments)
@@ -4168,7 +4168,7 @@ class AliceRacesOtherMiners(DoubleSpendingAttack):
for x in range(self.n_miners)
])
miners.set_height(alice.get_height())
- miners.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ miners.arrange(RIGHT, buff = LARGE_BUFF)
miners.to_edge(DOWN+LEFT)
miners.shift(0.5*UP)
miners_word = TextMobject("Miners")
@@ -4487,7 +4487,7 @@ class MainIdeas(Scene):
colors = BLUE, WHITE, RED, GREEN, YELLOW
for idea, color in zip(ideas, colors):
idea.set_color(color)
- ideas.arrange_submobjects(
+ ideas.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -4589,7 +4589,7 @@ class VariableProofOfWork(WhenToTrustANewBlock):
for x in range(self.n_miners - 1)
])
everyone = VGroup(target, *copies)
- everyone.arrange_submobjects(DOWN)
+ everyone.arrange(DOWN)
everyone.set_height(FRAME_HEIGHT - LARGE_BUFF)
everyone.to_corner(UP+LEFT)
@@ -4642,7 +4642,7 @@ class CompareBlockTimes(Scene):
TextMobject("XRP: ", "3.5 Seconds"),
TextMobject("LTC: ", "2.5 Minutes"),
)
- examples.arrange_submobjects(
+ examples.arrange(
DOWN,
buff = LARGE_BUFF,
aligned_edge = LEFT,
@@ -4705,7 +4705,7 @@ class BlockRewards(Scene):
TextMobject("Jul 2016 - Feb 2020$^*$:", "12.5", "BTC"),
TextMobject("Feb 2020$^*$ - Sep 2023$^*$:", "6.25", "BTC"),
)
- rewards.arrange_submobjects(
+ rewards.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -4860,7 +4860,7 @@ class ShowBitcoinBlockSize(LedgerScene):
BitcoinLogo(height = 0.75),
TextMobject("Block").scale(1.5)
)
- title.arrange_submobjects(RIGHT, SMALL_BUFF)
+ title.arrange(RIGHT, SMALL_BUFF)
title.next_to(block, UP)
brace = Brace(payments_rect, RIGHT)
@@ -4894,7 +4894,7 @@ class ShowBitcoinBlockSize(LedgerScene):
max_rate = TextMobject("Max: $>24{,}000$/second")
rates = VGroup(avg_rate, max_rate)
rates.scale(0.8)
- rates.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ rates.arrange(DOWN, aligned_edge = LEFT)
rates.next_to(visa_logo, RIGHT, buff = MED_SMALL_BUFF)
visa = VGroup(visa_logo, rates)
visa.to_corner(UP+RIGHT)
@@ -4938,7 +4938,7 @@ class TopicsNotCovered(TeacherStudentsScene):
"$\\vdots$",
"(See links in description)",
])))
- topics.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ topics.arrange(DOWN, aligned_edge = LEFT)
topics[-2].next_to(topics[-3], DOWN)
topics.next_to(title, RIGHT)
topics.to_edge(UP)
@@ -5017,9 +5017,9 @@ class ShowManyExchanges(Scene):
VGroup(*[
exchange.copy()
for x in range(3)
- ]).arrange_submobjects(RIGHT, buff = 2*LARGE_BUFF)
+ ]).arrange(RIGHT, buff = 2*LARGE_BUFF)
for y in range(3)
- ]).arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ ]).arrange(DOWN, buff = MED_LARGE_BUFF)
exchanges = VGroup(*it.chain(*exchanges))
self.add(exchanges)
start_times = list(np.linspace(0, 2, len(exchanges)))
@@ -5227,7 +5227,7 @@ class Thumbnail(DistributedBlockChainScene):
# for logo in logos:
# logo.set_height(1)
# logos.add(TexMobject("\\dots").scale(2))
- # logos.arrange_submobjects(RIGHT)
+ # logos.arrange(RIGHT)
# logos.next_to(title, RIGHT, LARGE_BUFF)
# self.add(logos)
diff --git a/old_projects/dandelin.py b/old_projects/dandelin.py
index a575219c5..880147b25 100644
--- a/old_projects/dandelin.py
+++ b/old_projects/dandelin.py
@@ -148,9 +148,9 @@ class SumOfIntegersProof(Scene):
rows = VGroup()
for count in range(1, self.n + 1):
row = VGroup(*[Square() for k in range(count)])
- row.arrange_submobjects(RIGHT, buff=0)
+ row.arrange(RIGHT, buff=0)
rows.add(row)
- rows.arrange_submobjects(DOWN, buff=0, aligned_edge=LEFT)
+ rows.arrange(DOWN, buff=0, aligned_edge=LEFT)
rows.set_height(5)
rows.set_stroke(WHITE, 3)
rows.set_fill(BLUE, 0.5)
@@ -210,7 +210,7 @@ class MultipleDefinitionsOfAnEllipse(Scene):
TextMobject("2. Thumbtack \\\\ \\quad\\, construction"),
TextMobject("3. Slice a cone"),
)
- definitions.arrange_submobjects(
+ definitions.arrange(
DOWN, buff=LARGE_BUFF,
aligned_edge=LEFT
)
@@ -426,7 +426,7 @@ class ShowArrayOfEccentricities(Scene):
self.get_ellipse(e, **kwargs)
for e in eccentricities
])
- result.arrange_submobjects(RIGHT, buff=buff)
+ result.arrange(RIGHT, buff=buff)
return result
def get_eccentricity(self, ellipse):
@@ -478,7 +478,7 @@ class ShowOrbits(ShowArrayOfEccentricities):
earth_orbit_words,
eccentricity_equals, eccentricity_label
)
- full_label.arrange_submobjects(RIGHT, SMALL_BUFF)
+ full_label.arrange(RIGHT, SMALL_BUFF)
earth_orbit_words.shift(0.5 * SMALL_BUFF * UL)
full_label.to_edge(UP)
@@ -674,7 +674,7 @@ class EccentricityInThumbtackCase(ShowArrayOfEccentricities):
words = TextMobject("Eccentricity = ")
decimal = DecimalNumber(0, num_decimal_places=2)
group = VGroup(words, decimal)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.to_edge(UP)
return group
@@ -811,7 +811,7 @@ class TriangleOfEquivalences(Scene):
self.add(title)
rects = VGroup(*[ScreenRectangle() for x in range(3)])
rects.set_height(2)
- rects[:2].arrange_submobjects(RIGHT, buff=2)
+ rects[:2].arrange(RIGHT, buff=2)
rects[2].next_to(rects[:2], DOWN, buff=1.5)
rects.next_to(title, DOWN)
@@ -1097,7 +1097,7 @@ class WriteConjecture(Scene):
words[1].in_equation,
TexMobject("||"),
)
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.scale(0.75)
equation.next_to(title, DOWN, MED_LARGE_BUFF)
equation.shift_onto_screen()
@@ -1182,7 +1182,7 @@ class QuickGeometryProof(Scene):
ticks = VGroup(Line(DOWN, UP), Line(DOWN, UP))
ticks.scale(0.1)
- ticks.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ ticks.arrange(RIGHT, buff=SMALL_BUFF)
equation = TexMobject(
"\\Delta OP_1Q \\cong \\Delta OP_2Q",
@@ -1349,7 +1349,7 @@ class AskWhyYouWouldChooseThisProof(PiCreatureScene):
other = PiCreature(color=RED_D)
other.flip()
group = VGroup(randy, other)
- group.arrange_submobjects(RIGHT, buff=5)
+ group.arrange(RIGHT, buff=5)
group.to_edge(DOWN)
return group
@@ -1489,7 +1489,7 @@ class LockhartQuote(Scene):
pictures = Group(measurement, madame_bovary, mona_lisa)
for picture in pictures:
picture.set_height(4)
- pictures.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ pictures.arrange(RIGHT, buff=LARGE_BUFF)
pictures.to_edge(DOWN)
measurement.save_state()
@@ -1611,7 +1611,7 @@ class EllipseLengthsLinedUp(EccentricityInThumbtackCase):
line.put_start_and_end_on(
ORIGIN, d * UP
)
- lines.arrange_submobjects(DOWN, buff=0)
+ lines.arrange(DOWN, buff=0)
lines.next_to(arrow, RIGHT)
h_line.move_to(lines[0].get_bottom())
lines_animation = ContinualUpdate(
diff --git a/old_projects/div_curl.py b/old_projects/div_curl.py
index 5a43966c8..93f8a624a 100644
--- a/old_projects/div_curl.py
+++ b/old_projects/div_curl.py
@@ -990,7 +990,7 @@ class ElectricField(CylinderModel, MovingCameraScene):
for method in (get_proton, get_electron)
]
for group in groups:
- group.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ group.arrange(RIGHT, buff=MED_SMALL_BUFF)
random.shuffle(group.submobjects)
protons.next_to(FRAME_HEIGHT * DOWN / 2, DOWN)
electrons.next_to(FRAME_HEIGHT * UP / 2, UP)
@@ -1149,9 +1149,9 @@ class AskQuestions(TeacherStudentsScene):
curl = VGroup(curl_name, curl_tex)
for group in div, curl:
group[1].set_color_by_tex(vec_tex("v"), YELLOW)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
topics = VGroup(div, curl)
- topics.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ topics.arrange(DOWN, buff=LARGE_BUFF)
topics.move_to(self.hold_up_spot, DOWN)
div.save_state()
div.move_to(self.hold_up_spot, DOWN)
@@ -1232,7 +1232,7 @@ class ScopeMeiosis(PiCreatureScene):
VGroup(title, self.get_lines(title, 3))
for title in section_titles
])
- sections.arrange_submobjects(
+ sections.arrange(
DOWN, buff=MED_LARGE_BUFF,
aligned_edge=LEFT
)
@@ -1272,7 +1272,7 @@ class ScopeMeiosis(PiCreatureScene):
Line(3 * LEFT, 3 * RIGHT, color=LIGHT_GREY)
for x in range(n_lines)
])
- lines.arrange_submobjects(DOWN, buff=MED_SMALL_BUFF)
+ lines.arrange(DOWN, buff=MED_SMALL_BUFF)
lines.next_to(
title, DOWN,
buff=MED_LARGE_BUFF,
@@ -1498,7 +1498,7 @@ class IntroduceVectorField(Scene):
)
for color in (BLUE, RED)
])
- magnet.arrange_submobjects(RIGHT, buff=0)
+ magnet.arrange(RIGHT, buff=0)
for char, vect in ("S", LEFT), ("N", RIGHT):
letter = TextMobject(char)
edge = magnet.get_edge_center(vect)
@@ -1605,7 +1605,7 @@ class ChangingElectricField(Scene):
particles.add(particle)
particle.shift(np.random.normal(0, 0.2, 3))
- particles.arrange_submobjects_in_grid(buff=LARGE_BUFF)
+ particles.arrange_in_grid(buff=LARGE_BUFF)
return particles
def get_vector_field(self):
@@ -1739,7 +1739,7 @@ class DefineDivergence(ChangingElectricField):
particles = self.get_particles()
random.shuffle(particles.submobjects)
particles.remove(particles[0])
- particles.arrange_submobjects_in_grid(
+ particles.arrange_in_grid(
n_cols=4, buff=3
)
for particle in particles:
@@ -2736,7 +2736,7 @@ class MaxwellsEquations(Scene):
""",
]
])
- equations.arrange_submobjects(
+ equations.arrange(
DOWN, aligned_edge=LEFT,
buff=MED_LARGE_BUFF
)
@@ -2748,7 +2748,7 @@ class MaxwellsEquations(Scene):
"\\text{Magnetic field: } \\textbf{B}",
]
])
- field_definitions.arrange_submobjects(
+ field_definitions.arrange(
RIGHT, buff=MED_LARGE_BUFF
)
field_definitions.next_to(title, DOWN, MED_LARGE_BUFF)
@@ -2886,7 +2886,7 @@ class IllustrateGaussLaw(DefineDivergence, MovingCameraScene):
get_proton(radius=0.1),
get_electron(radius=0.1),
)
- particles.arrange_submobjects(RIGHT, buff=2.25)
+ particles.arrange(RIGHT, buff=2.25)
particles.shift(0.25 * UP)
for particle, sign in zip(particles, [+1, -1]):
particle.charge = sign
@@ -3021,7 +3021,7 @@ class ShowTwoPopulations(Scene):
for mob in examples:
mob.save_state()
mob.set_height(3)
- examples.arrange_submobjects(LEFT, buff=2)
+ examples.arrange(LEFT, buff=2)
preditor, prey = words = VGroup(
TextMobject("Predator"),
@@ -3163,7 +3163,7 @@ class ShowTwoPopulations(Scene):
)
for label in labels:
label.scale(self.count_word_scale_val)
- labels.arrange_submobjects(RIGHT, buff=2)
+ labels.arrange(RIGHT, buff=2)
labels.to_edge(UP)
return labels
@@ -3218,7 +3218,7 @@ class PhaseSpaceOfPopulationModel(ShowTwoPopulations, PiCreatureScene, MovingCam
VGroup(
method().set_height(0.75),
TextMobject("Population"),
- ).arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ ).arrange(RIGHT, buff=MED_SMALL_BUFF)
for method in (self.get_rabbit, self.get_fox)
])
for axis, label, vect in zip(axes, axes_labels, [RIGHT, UP]):
@@ -3480,7 +3480,7 @@ class PhaseFlowQuestions(Scene):
),
TextMobject("Where are there cycles?"),
)
- questions.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ questions.arrange(DOWN, buff=LARGE_BUFF)
questions.to_corner(UR)
for question in questions:
self.play(FadeInFromDown(question))
@@ -3608,7 +3608,7 @@ class NablaNotation(PiCreatureScene, MovingCameraScene):
)
curl_nabla = curl_equation.get_part_by_tex("\\nabla")
equations = VGroup(div_equation, curl_equation)
- equations.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ equations.arrange(DOWN, buff=LARGE_BUFF)
equations.next_to(morty, UP, 2)
equations.to_edge(LEFT)
@@ -3654,7 +3654,7 @@ class NablaNotation(PiCreatureScene, MovingCameraScene):
])
colors = [BLUE, YELLOW]
for lhs, color in zip(lhs_groups, colors):
- lhs.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ lhs.arrange(RIGHT, buff=MED_SMALL_BUFF)
VGroup(lhs[0].brackets, lhs[1]).set_color(color)
div_lhs.to_edge(UP)
curl_lhs.next_to(div_lhs, DOWN, buff=LARGE_BUFF)
@@ -3739,7 +3739,7 @@ class DivCurlDotCross(Scene):
ScreenRectangle(height=2.5)
for n in range(4)
])
- rects.arrange_submobjects_in_grid(n_rows=2, buff=LARGE_BUFF)
+ rects.arrange_in_grid(n_rows=2, buff=LARGE_BUFF)
rects[2:].shift(MED_LARGE_BUFF * DOWN)
titles = VGroup(*list(map(TextMobject, [
"Divergence", "Curl",
@@ -4051,7 +4051,7 @@ class DivergenceTinyNudgesView(MovingCameraScene):
arg_separator="",
).scale(sf)
group = VGroup(div_text, dot_product)
- group.arrange_submobjects(RIGHT, buff=sf * MED_SMALL_BUFF)
+ group.arrange(RIGHT, buff=sf * MED_SMALL_BUFF)
group.next_to(
self.camera_frame.get_top(), DOWN,
buff=sf * MED_SMALL_BUFF
@@ -4193,7 +4193,7 @@ class DivergenceTinyNudgesView(MovingCameraScene):
cross_product.add_background_rectangle(opacity=1)
group = VGroup(curl_text, cross_product)
- group.arrange_submobjects(RIGHT, buff=sf * MED_SMALL_BUFF)
+ group.arrange(RIGHT, buff=sf * MED_SMALL_BUFF)
group.next_to(self.camera_frame.get_top(), sf * DOWN)
self.play(
@@ -4363,7 +4363,7 @@ class IncmpressibleAndIrrotational(Scene):
for op, word in (div_0, incompressible), (curl_0, irrotational):
op.generate_target()
group = VGroup(op.target, word)
- group.arrange_submobjects(RIGHT, buff=MED_LARGE_BUFF)
+ group.arrange(RIGHT, buff=MED_LARGE_BUFF)
group.move_to(op)
self.play(FadeInFromDown(div_0))
@@ -4551,7 +4551,7 @@ class ThoughtsOnAds(Scene):
line.move_to(DOWN)
arrows = VGroup(Vector(2 * LEFT), Vector(2 * RIGHT))
- arrows.arrange_submobjects(RIGHT, buff=2)
+ arrows.arrange(RIGHT, buff=2)
arrows.next_to(line, DOWN)
misaligned = TextMobject("Misaligned")
@@ -4616,7 +4616,7 @@ class ThoughtsOnAds(Scene):
ImageMobject("3b1b_logo", height=1),
TextMobject("(hopefully)").scale(0.8)
)
- right_rect_label.arrange_submobjects(DOWN, buff=SMALL_BUFF)
+ right_rect_label.arrange(DOWN, buff=SMALL_BUFF)
# TextMobject(
# "Where I hope \\\\ I've been"
# )
diff --git a/old_projects/efvgt.py b/old_projects/efvgt.py
index d1591baf0..b0336a49e 100644
--- a/old_projects/efvgt.py
+++ b/old_projects/efvgt.py
@@ -426,7 +426,7 @@ class SymmetriesOfSquare(ThreeDScene):
self.square.copy().scale(0.5)
for x in range(8)
])
- all_squares.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ all_squares.arrange(RIGHT, buff = LARGE_BUFF)
top_squares = VGroup(*all_squares[:4])
bottom_squares = VGroup(*all_squares[4:])
@@ -819,7 +819,7 @@ class AddSquareSymmetries(SymmetriesOfSquare):
equation[4].add(self.get_axis_line(equation[4], UP+RIGHT))
for mob in equation[::2]:
mob.scale(0.5)
- equation.arrange_submobjects(RIGHT)
+ equation.arrange(RIGHT)
equation.to_edge(UP)
arcs = self.get_rotation_arcs(square, np.pi/2)
@@ -958,7 +958,7 @@ class AddCubeSymmetries(GroupOfCubeSymmetries):
cube.copy(), TexMobject("="),
cube.copy()
)
- equation.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ equation.arrange(RIGHT, buff = MED_LARGE_BUFF)
equation.center()
self.add(cube1)
@@ -1096,7 +1096,7 @@ class DihedralGroupStructure(SymmetriesOfSquare):
"angle" : angle,
"axis" : axis,
}
- expression.arrange_submobjects()
+ expression.arrange()
expression.set_width(FRAME_X_RADIUS+1)
expression.to_edge(RIGHT, buff = SMALL_BUFF)
for square in s1, s2, s3:
@@ -1162,7 +1162,7 @@ class ThisIsAVeryGeneralIdea(Scene):
"Numbers",
])))
numbers = examples[-1]
- examples.arrange_submobjects(buff = LARGE_BUFF)
+ examples.arrange(buff = LARGE_BUFF)
examples.set_width(FRAME_WIDTH-1)
examples.move_to(UP)
@@ -1194,7 +1194,7 @@ class ThisIsAVeryGeneralIdea(Scene):
"Numbers \\\\ (Additive)",
"Numbers \\\\ (Multiplicative)",
])))
- sub_categories.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ sub_categories.arrange(RIGHT, buff = MED_LARGE_BUFF)
sub_categories.next_to(numbers, DOWN, 1.5*LARGE_BUFF)
sub_categories.to_edge(RIGHT)
sub_categories[0].set_color(ADDER_COLOR)
@@ -1963,7 +1963,7 @@ class MultiplicativeGroupOfReals(AdditiveGroupOfReals):
for word in ["Stretch" if num > 1 else "Squish"]
])
words.submobjects.insert(2, TexMobject("="))
- words.arrange_submobjects(RIGHT)
+ words.arrange(RIGHT)
top_words = VGroup(*words[:2])
top_words.set_color(MULTIPLIER_COLOR)
bottom_words = VGroup(*words[2:])
@@ -2374,7 +2374,7 @@ class ExponentsAsRepeatedMultiplication(TeacherStudentsScene):
rule = VGroup(
lhs, three_twos.target, cdot, five_twos.target
)
- rule.arrange_submobjects()
+ rule.arrange()
lhs.next_to(three_twos.target, LEFT, aligned_edge = DOWN)
rule.next_to(self.get_pi_creatures(), UP)
@@ -2422,7 +2422,7 @@ class ExponentsAsRepeatedMultiplication(TeacherStudentsScene):
TexMobject("2^{-1}"),
TexMobject("2^{i}"),
)
- alt_powers.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ alt_powers.arrange(RIGHT, buff = LARGE_BUFF)
alt_powers.next_to(self.get_students(), UP, buff = LARGE_BUFF)
self.play(
@@ -2458,7 +2458,7 @@ class ExponentsAsRepeatedMultiplication(TeacherStudentsScene):
"\\big( 2^{1} \\big) = 2^{0}"
)
expressions = VGroup(half_expression, neg_one_expression)
- expressions.arrange_submobjects(
+ expressions.arrange(
DOWN, aligned_edge = LEFT, buff = MED_LARGE_BUFF
)
expressions.next_to(self.get_students(), UP, buff = LARGE_BUFF)
diff --git a/old_projects/eoc/chapter1.py b/old_projects/eoc/chapter1.py
index f0940d16d..9254025a2 100644
--- a/old_projects/eoc/chapter1.py
+++ b/old_projects/eoc/chapter1.py
@@ -351,7 +351,7 @@ class Introduction(TeacherStudentsScene):
calculus.generate_target()
invent = TextMobject("Invent")
invent_calculus = VGroup(invent, calculus.target)
- invent_calculus.arrange_submobjects(RIGHT, buff = MED_SMALL_BUFF)
+ invent_calculus.arrange(RIGHT, buff = MED_SMALL_BUFF)
invent_calculus.next_to(student, UP, 1.5*LARGE_BUFF)
invent_calculus.shift(RIGHT)
arrow = Arrow(invent_calculus, student)
@@ -464,7 +464,7 @@ class ProductRuleDiagram(Scene):
g_label.generate_target()
fg_group = VGroup(f_label.target, g_label.target)
fg_group.generate_target()
- fg_group.target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ fg_group.target.arrange(RIGHT, buff = SMALL_BUFF)
fg_group.target.move_to(rect.get_center())
for mob in df_brace, df_label, dg_brace, dg_label:
@@ -573,7 +573,7 @@ class IntroduceCircle(CircleScene):
self.get_unwrapped(ring, to_edge = None)
for ring in rings
])
- unwrapped_rings.arrange_submobjects(UP, buff = SMALL_BUFF)
+ unwrapped_rings.arrange(UP, buff = SMALL_BUFF)
unwrapped_rings.move_to(self.unwrapped_tip, UP)
ring_anim_kwargs = {
"run_time" : 3,
@@ -853,7 +853,7 @@ class ApproximateOneRing(CircleScene, ReconfigurableScene):
)
two_pi_r_dr = VGroup(width_label, dr_label).copy()
two_pi_r_dr.generate_target()
- two_pi_r_dr.target.arrange_submobjects(
+ two_pi_r_dr.target.arrange(
RIGHT, buff = SMALL_BUFF, aligned_edge = DOWN
)
two_pi_r_dr.target.next_to(approx, RIGHT, aligned_edge = DOWN)
@@ -1175,7 +1175,7 @@ class GraphRectangles(CircleScene, GraphScene):
*foreground_animations
)
self.play(
- self.dr_group.arrange_submobjects, DOWN,
+ self.dr_group.arrange, DOWN,
self.dr_group.next_to, highlighted_ring,
DOWN, SMALL_BUFF
)
@@ -1251,7 +1251,7 @@ class GraphRectangles(CircleScene, GraphScene):
approximation = TextMobject("= Approximation")
approximation.scale(0.8)
group = VGroup(rect.target, approximation)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.to_edge(RIGHT)
self.play(
@@ -1409,7 +1409,7 @@ class GraphRectangles(CircleScene, GraphScene):
last_ring = rings[-1]
arranged_group.add(last_ring.target)
- arranged_group.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ arranged_group.arrange(DOWN, buff = SMALL_BUFF)
arranged_group.set_height(FRAME_HEIGHT-1)
arranged_group.to_corner(DOWN+LEFT, buff = MED_SMALL_BUFF)
for mob in tex_mobs:
@@ -1518,7 +1518,7 @@ class RecapCircleSolution(GraphRectangles, ReconfigurableScene):
down_arrow = TexMobject("\\Downarrow")
sum_words = TextMobject("Sum of many \\\\ small values")
integral_condition = VGroup(hard_problem, down_arrow, sum_words)
- integral_condition.arrange_submobjects(DOWN)
+ integral_condition.arrange(DOWN)
integral_condition.scale(0.8)
integral_condition.to_corner(UP+RIGHT)
@@ -1706,7 +1706,7 @@ class RecapCircleSolution(GraphRectangles, ReconfigurableScene):
def full_precision(self):
words = TextMobject("Area under \\\\ a graph")
group = VGroup(TexMobject("\\Downarrow"), words)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.set_color(YELLOW)
group.scale(0.8)
group.next_to(self.integral_condition, DOWN)
diff --git a/old_projects/eoc/chapter10.py b/old_projects/eoc/chapter10.py
index 80cf6ddc5..7f41998a5 100644
--- a/old_projects/eoc/chapter10.py
+++ b/old_projects/eoc/chapter10.py
@@ -1861,7 +1861,7 @@ class EachTermControlsOneDerivative(Scene):
for n in range(2, 5)
]
])
- deriv_words.arrange_submobjects(
+ deriv_words.arrange(
RIGHT,
buff = LARGE_BUFF,
aligned_edge = UP
@@ -2117,7 +2117,7 @@ class TranslationOfInformation(CubicAndQuarticApproximations):
arrows
))))
group.add(TexMobject("\\vdots"))
- group.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ group.arrange(DOWN, buff = SMALL_BUFF)
group.set_height(FRAME_HEIGHT - MED_LARGE_BUFF)
group.to_edge(LEFT)
for dx, d0, color in zip(derivs_at_x, derivs_at_zero, self.colors):
@@ -2270,7 +2270,7 @@ class TranslationOfInformation(CubicAndQuarticApproximations):
])
for arg in ("x", "0", "a")
]
- derivs_at_x.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ derivs_at_x.arrange(DOWN, buff = MED_LARGE_BUFF)
derivs_at_x.set_height(FRAME_HEIGHT - MED_LARGE_BUFF)
derivs_at_x.to_edge(LEFT)
zeros = VGroup(*[
@@ -2530,7 +2530,7 @@ class ExpPolynomial(TranslationOfInformation, ExampleApproximationWithExp):
arrows
))))
group.add(TexMobject("\\vdots"))
- group.arrange_submobjects(DOWN, buff = 2*SMALL_BUFF)
+ group.arrange(DOWN, buff = 2*SMALL_BUFF)
group.set_height(FRAME_HEIGHT - MED_LARGE_BUFF)
group.to_edge(LEFT)
for dx, d0 in zip(derivs_at_x, derivs_at_zero):
@@ -2874,7 +2874,7 @@ class SecondTermIntuition(AreaIsDerivative):
equals_half.scale(tex_scale_factor)
group = VGroup(triangle, equals_half, height_term, base_term)
group.generate_target()
- group.target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.target.arrange(RIGHT, buff = SMALL_BUFF)
group.target[-1].next_to(
group.target[-2], RIGHT,
buff = SMALL_BUFF,
@@ -2917,7 +2917,7 @@ class SecondTermIntuition(AreaIsDerivative):
TexMobject("+"), mini_rect,
TexMobject("+"), mini_triangle,
)
- geometric_taylor.arrange_submobjects(
+ geometric_taylor.arrange(
RIGHT, buff = MED_SMALL_BUFF
)
geometric_taylor.to_corner(UP+LEFT)
@@ -3171,9 +3171,9 @@ class ExpConvergenceExample(ConvergenceExample):
term.set_color(color)
lhs = TexMobject("e^%s"%arg, "\\rightarrow")
- lhs.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ lhs.arrange(RIGHT, buff = SMALL_BUFF)
group = VGroup(lhs, series)
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
return group
diff --git a/old_projects/eoc/chapter2.py b/old_projects/eoc/chapter2.py
index 377c480e8..c3d8a5b3a 100644
--- a/old_projects/eoc/chapter2.py
+++ b/old_projects/eoc/chapter2.py
@@ -185,7 +185,7 @@ class FathersOfCalculus(Scene):
title.next_to(image, DOWN)
image.add(title)
men.add(image)
- men.arrange_submobjects(RIGHT, aligned_edge = UP)
+ men.arrange(RIGHT, aligned_edge = UP)
men.shift(DOWN)
discover_brace = Brace(Mobject(*men[:3]), UP)
@@ -740,7 +740,7 @@ class CompareTwoTimes(Scene):
change_over_change, down_arrow2,
formula,
)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_corner(UP+RIGHT)
self.play(FadeIn(
@@ -2046,7 +2046,7 @@ class TimeForAnActualParadox(TeacherStudentsScene):
paradoxes = TextMobject("Paradoxes")
arrow = Arrow(ORIGIN, DOWN, buff = 0)
group = VGroup(words, arrow, paradoxes)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_edge(UP)
teacher = self.get_teacher()
diff --git a/old_projects/eoc/chapter3.py b/old_projects/eoc/chapter3.py
index 0acafad3e..278667682 100644
--- a/old_projects/eoc/chapter3.py
+++ b/old_projects/eoc/chapter3.py
@@ -56,7 +56,7 @@ class ContrastAbstractAndConcrete(Scene):
"f(x) = e^x",
"\\v_dots"
])))
- functions.arrange_submobjects(
+ functions.arrange(
DOWN,
aligned_edge = LEFT,
buff = LARGE_BUFF
@@ -190,7 +190,7 @@ class ListOfRules(PiCreatureScene):
"\\frac{d}{dx} a^x = \\ln(a) a^x",
"\\vdots"
])))
- rules.arrange_submobjects(
+ rules.arrange(
DOWN, buff = MED_LARGE_BUFF,
aligned_edge = LEFT,
)
@@ -512,7 +512,7 @@ class NudgeSideLengthOfSquare(PiCreatureScene):
TexMobject("+"),
corner_square.copy()
)
- df_equation.arrange_submobjects()
+ df_equation.arrange()
df_equation.next_to(
self.function_label, DOWN,
aligned_edge = LEFT,
@@ -908,7 +908,7 @@ class NudgeSideLengthOfCube(Scene):
three_d_mob.scale(self.small_piece_scaling_factor)
# self.pose_3d_mobject(three_d_mob)
faces.set_fill(opacity = 0.3)
- df_equation.arrange_submobjects(RIGHT)
+ df_equation.arrange(RIGHT)
df_equation.next_to(ORIGIN, RIGHT)
df_equation.to_edge(UP)
@@ -1126,7 +1126,7 @@ class NudgeSideLengthOfCube(Scene):
face.rotate(np.pi/2, DOWN)
elif thin_dim == 1:
face.rotate(np.pi/2, RIGHT)
- faces.arrange_submobjects(OUT, buff = LARGE_BUFF)
+ faces.arrange(OUT, buff = LARGE_BUFF)
self.pose_3d_mobject(faces)
return faces
@@ -1142,7 +1142,7 @@ class NudgeSideLengthOfCube(Scene):
bar.rotate(np.pi/2, OUT)
elif thick_dim == 2:
bar.rotate(np.pi/2, LEFT)
- bars.arrange_submobjects(OUT, buff = LARGE_BUFF)
+ bars.arrange(OUT, buff = LARGE_BUFF)
self.pose_3d_mobject(bars)
return bars
@@ -1297,7 +1297,7 @@ class PatternForPowerRule(PiCreatureScene):
)
VGroup(*derivative[0][2:4]).set_color(color)
derivatives.add(derivative)
- derivatives.arrange_submobjects(
+ derivatives.arrange(
DOWN, aligned_edge = LEFT,
buff = MED_LARGE_BUFF
)
@@ -1431,7 +1431,7 @@ class PowerRuleAlgebra(Scene):
mob.set_color_by_tex("x", self.x_color)
nudge_group = VGroup(x_to_n, down_arrow, x_dx_to_n)
- nudge_group.arrange_submobjects(DOWN)
+ nudge_group.arrange(DOWN)
nudge_group.to_corner(UP+LEFT)
down_arrow.next_to(x_to_n[0], DOWN)
equals.next_to(x_dx_to_n)
@@ -1550,7 +1550,7 @@ class PowerRuleAlgebra(Scene):
for dot_index, dot in enumerate(dots):
target_list.insert(2*dot_index, dot)
group = VGroup(*target_list)
- group.arrange_submobjects(RIGHT, SMALL_BUFF)
+ group.arrange(RIGHT, SMALL_BUFF)
if last_group is None:
group.next_to(x_to_n, RIGHT)
else:
@@ -2671,7 +2671,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
cos.add_background_rectangle()
group = VGroup(d_ratio, trig_ratio, cos)
- group.arrange_submobjects()
+ group.arrange()
group.next_to(
self.title, DOWN,
buff = MED_LARGE_BUFF,
@@ -2700,7 +2700,7 @@ class NextVideo(TeacherStudentsScene):
d_composition = TexMobject("\\frac{d}{dx} \\cos\\left(\\frac{1}{x}\\right)")
group = VGroup(d_sum, d_product, d_composition)
- group.arrange_submobjects(RIGHT, buff = 2*LARGE_BUFF)
+ group.arrange(RIGHT, buff = 2*LARGE_BUFF)
group.next_to(VGroup(*self.get_pi_creatures()), UP, buff = LARGE_BUFF)
self.play(
diff --git a/old_projects/eoc/chapter4.py b/old_projects/eoc/chapter4.py
index 55421f41d..f2d8e2bdd 100644
--- a/old_projects/eoc/chapter4.py
+++ b/old_projects/eoc/chapter4.py
@@ -32,7 +32,7 @@ class TransitionFromLastVideo(TeacherStudentsScene):
]
])
for rules in simple_rules, combination_rules:
- rules.arrange_submobjects(buff = LARGE_BUFF)
+ rules.arrange(buff = LARGE_BUFF)
rules.next_to(self.get_teacher(), UP, buff = MED_LARGE_BUFF)
rules.to_edge(LEFT)
@@ -273,7 +273,7 @@ class PreSumRuleDiscussion(Scene):
formula[6].set_color(SINE_COLOR)
formula[3].set_color(X_SQUARED_COLOR)
formula[8].set_color(X_SQUARED_COLOR)
- VGroup(specific, general).arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ VGroup(specific, general).arrange(DOWN, buff = LARGE_BUFF)
#Add on rules
self.add(specific)
@@ -575,7 +575,7 @@ class SumRule(GraphScene):
DashedLine(ORIGIN, 2*RIGHT, stroke_width = 3)
for x in range(2)
])
- h_lines.arrange_submobjects(DOWN, buff = distance)
+ h_lines.arrange(DOWN, buff = distance)
h_lines.move_to(v_lines[1].get_top(), UP+RIGHT)
brace = Brace(h_lines, LEFT)
@@ -1029,7 +1029,7 @@ class IntroduceProductAsArea(ReconfigurableScene):
self.play(Write(VGroup(*deriv[:2])))
self.play(
- df_boxes_copy.arrange_submobjects,
+ df_boxes_copy.arrange,
df_boxes_copy.set_fill, None, self.df_box_kwargs["fill_opacity"],
df_boxes_copy.next_to, deriv[1]
)
@@ -1467,7 +1467,7 @@ class ShoveXSquaredInSine(Scene):
x_squared = TexMobject("h(x)", "=", "x^2")
x_squared.set_color(X_SQUARED_COLOR)
group = VGroup(sine, x_squared)
- group.arrange_submobjects(buff = LARGE_BUFF)
+ group.arrange(buff = LARGE_BUFF)
group.shift(UP)
composition = TexMobject(
"g(", "h(x)", ")", "=", "\\sin(", "x^2", ")"
@@ -1780,7 +1780,7 @@ class ThreeLinesChainRule(ReconfigurableScene):
words = TextMobject("For example,")
expression = TexMobject("\\cos(1.5^2)\\cdot 2(1.5)\\,dx")
group = VGroup(words, expression)
- group.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ group.arrange(DOWN, aligned_edge = LEFT)
group.scale(0.8)
group.to_edge(RIGHT)
arrow = Arrow(group.get_bottom(), self.final_derivative[0].get_top())
@@ -2101,7 +2101,7 @@ class WatchingVideo(PiCreatureScene):
"e^x(x^2 + 3x + 2)",
]
])
- formulas.arrange_submobjects(
+ formulas.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
diff --git a/old_projects/eoc/chapter5.py b/old_projects/eoc/chapter5.py
index c3d035c5f..5c597e339 100644
--- a/old_projects/eoc/chapter5.py
+++ b/old_projects/eoc/chapter5.py
@@ -26,7 +26,7 @@ class LastVideo(TeacherStudentsScene):
"\\frac{d(x^n)}{dx} = nx^{n-1}",
"\\frac{d(\\sin(x))}{dx} = \\cos(x)",
])))
- known_formulas.arrange_submobjects(
+ known_formulas.arrange(
DOWN, buff = MED_LARGE_BUFF,
)
known_formulas.set_height(2.5)
@@ -327,9 +327,9 @@ class DoublingPopulation(PiCreatureScene):
VGroup(*[
PiCreature(mode = "plain")
for y in range(height)
- ]).arrange_submobjects(UP, buff = MED_LARGE_BUFF)
+ ]).arrange(UP, buff = MED_LARGE_BUFF)
for x in range(width)
- ]).arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ ]).arrange(RIGHT, buff = MED_LARGE_BUFF)
creatures = VGroup(*it.chain(*creature_array))
creatures.set_height(self.pi_creature_grid_height)
creatures.to_corner(DOWN+RIGHT)
@@ -1009,7 +1009,7 @@ class CompareTwoConstantToEightConstant(PiCreatureScene):
for base in (2, 8)
])
- derivs.arrange_submobjects(
+ derivs.arrange(
DOWN, buff = 1.5, aligned_edge = LEFT
)
derivs.to_edge(LEFT, LARGE_BUFF).shift(UP)
@@ -1591,7 +1591,7 @@ class ManyExponentialForms(TeacherStudentsScene):
]
]
group = VGroup(lhs, *rhs_list)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.set_width(FRAME_WIDTH - LARGE_BUFF)
group.next_to(self.get_pi_creatures(), UP, 2*LARGE_BUFF)
for part in group:
@@ -1784,7 +1784,7 @@ class InvestedMoney(Scene):
class NaturalLog(Scene):
def construct(self):
expressions = VGroup(*list(map(self.get_expression, [2, 3, 7])))
- expressions.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ expressions.arrange(DOWN, buff = MED_SMALL_BUFF)
expressions.to_edge(LEFT)
self.play(FadeIn(
@@ -1898,7 +1898,7 @@ class NextVideo(TeacherStudentsScene):
next_tex = VGroup(*list(map(TextMobject, [
"Chain rule", "Product rule", "$\\vdots$"
])))
- next_tex.arrange_submobjects(DOWN)
+ next_tex.arrange(DOWN)
next_tex.next_to(brace, DOWN)
next_tex.shift(
next_video.get_center()[0]*RIGHT\
diff --git a/old_projects/eoc/chapter6.py b/old_projects/eoc/chapter6.py
index 3cb16103f..3f9f0c157 100644
--- a/old_projects/eoc/chapter6.py
+++ b/old_projects/eoc/chapter6.py
@@ -530,7 +530,7 @@ class NameImplicitDifferentation(TeacherStudentsScene):
VGroup(*derivative[2][2:]).set_color(RED)
arrow = Arrow(ORIGIN, DOWN, buff = SMALL_BUFF)
group = VGroup(title, equation, arrow, derivative)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_edge(UP)
self.add(title, equation)
@@ -2657,7 +2657,7 @@ class Thumbnail(AlternateExample):
title = VGroup(*list(map(TextMobject, [
"Implicit", "Differentiation"
])))
- title.arrange_submobjects(DOWN)
+ title.arrange(DOWN)
title.scale(3)
title.next_to(ORIGIN, UP)
diff --git a/old_projects/eoc/chapter7.py b/old_projects/eoc/chapter7.py
index 78aee0000..9efe94e07 100644
--- a/old_projects/eoc/chapter7.py
+++ b/old_projects/eoc/chapter7.py
@@ -138,7 +138,7 @@ class LimitJustMeansApproach(PiCreatureScene):
ratio = ((2+dx)**3-2**3)/dx
ratio_mob = TexMobject("%.6f\\dots"%ratio)
group = VGroup(expression, TexMobject("="), ratio_mob)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
result.add(group)
return result
@@ -740,7 +740,7 @@ class GoalsListed(Scene):
"L'Hôpital's rule",
])
])
- goals.arrange_submobjects(
+ goals.arrange(
DOWN, buff = LARGE_BUFF, aligned_edge = LEFT
)
@@ -1726,7 +1726,7 @@ class TheoryHeavy(TeacherStudentsScene):
"\\over \\,", "h}"
)
derivative = VGroup(lhs, equals, rhs)
- derivative.arrange_submobjects(RIGHT)
+ derivative.arrange(RIGHT)
for tex_mob in derivative:
tex_mob.set_color_by_tex("x", RED)
tex_mob.set_color_by_tex("h", GREEN)
diff --git a/old_projects/eoc/chapter8.py b/old_projects/eoc/chapter8.py
index 02a587d62..c5a52bac8 100644
--- a/old_projects/eoc/chapter8.py
+++ b/old_projects/eoc/chapter8.py
@@ -2209,7 +2209,7 @@ class LowerBound(AreaIsDerivative):
self.play(Write(plus_fives, run_time = 2))
self.wait(2)
self.play(
- group.arrange_submobjects,
+ group.arrange,
group.next_to, antideriv_diff, DOWN, MED_LARGE_BUFF
)
self.wait()
@@ -2249,7 +2249,7 @@ class LowerBound(AreaIsDerivative):
TexMobject("-"), parts[1],
)
result.left_part, result.right_part = parts
- result.arrange_submobjects(RIGHT)
+ result.arrange(RIGHT)
result.scale(0.9)
result.next_to(self.integral, RIGHT)
return result
diff --git a/old_projects/eoc/chapter9.py b/old_projects/eoc/chapter9.py
index 0ac34dbc3..1ae5f3cb9 100644
--- a/old_projects/eoc/chapter9.py
+++ b/old_projects/eoc/chapter9.py
@@ -254,10 +254,10 @@ class LengthOfDayGraph(GraphScene):
)
for x in range(6)
])
- panel.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ panel.arrange(RIGHT, buff = SMALL_BUFF)
panel.center()
panels = ThreeDMobject(panel, panel.copy(), panel.copy())
- panels.arrange_submobjects(DOWN)
+ panels.arrange(DOWN)
panels.rotate(4*np.pi/12, DOWN)
panels.rotate(-np.pi/6, OUT)
side_vect = RIGHT
@@ -367,9 +367,9 @@ class AverageOfFiniteSet(Scene):
])
colors = Color(BLUE).range_to(RED, len(lengths))
lines.set_color_by_gradient(*colors)
- lines.arrange_submobjects(RIGHT)
+ lines.arrange(RIGHT)
lines.generate_target()
- lines.target.arrange_submobjects(RIGHT, buff = 0)
+ lines.target.arrange(RIGHT, buff = 0)
for mob in lines, lines.target:
mob.shift(UP)
brace = Brace(lines.target, UP)
@@ -388,7 +388,7 @@ class AverageOfFiniteSet(Scene):
symbols.generate_target()
symbols.target.set_fill(opacity = 1)
sum_eq = VGroup(*it.chain(*list(zip(labels.target, symbols.target))))
- sum_eq.arrange_submobjects(RIGHT)
+ sum_eq.arrange(RIGHT)
sum_eq.next_to(brace, UP)
sum_mob = TexMobject(str(sum(lengths)))
@@ -475,7 +475,7 @@ class TryToAddInfinitelyManyPoints(AverageOfSineStart):
plusses = VGroup(*[TexMobject("+") for x in start_lines])
sum_eq = VGroup(*it.chain(*list(zip(start_lines, plusses))))
sum_eq.add(*end_lines)
- sum_eq.arrange_submobjects(RIGHT)
+ sum_eq.arrange(RIGHT)
sum_eq.next_to(v_lines[0], UP, aligned_edge = LEFT)
sum_eq.to_edge(UP, buff = MED_SMALL_BUFF)
@@ -573,7 +573,7 @@ class FiniteSample(TryToAddInfinitelyManyPoints):
numerator = VGroup(*it.chain(*list(zip(summed_v_lines, plusses))))
for group in numerator, plusses:
group.remove(plusses[-1])
- numerator.arrange_submobjects(
+ numerator.arrange(
RIGHT,
buff = SMALL_BUFF,
aligned_edge = DOWN
@@ -1614,7 +1614,7 @@ class GeneralAverage(AverageOfContinuousVariable):
for tex, color in zip("ab", self.bound_colors):
rhs.set_color_by_tex(tex, color)
expression = VGroup(num_samples, approx, rhs)
- expression.arrange_submobjects(RIGHT)
+ expression.arrange(RIGHT)
expression.next_to(self.y_axis, RIGHT)
rhs_copy = rhs.copy()
diff --git a/old_projects/eoc/footnote.py b/old_projects/eoc/footnote.py
index 9cb572b51..0003d6c49 100644
--- a/old_projects/eoc/footnote.py
+++ b/old_projects/eoc/footnote.py
@@ -528,7 +528,7 @@ class HowToReadNotation(GraphScene, ReconfigurableScene):
def show_ddf(self):
df_dx_groups = self.df_dx_groups.copy()
df_dx_groups.generate_target()
- df_dx_groups.target.arrange_submobjects(
+ df_dx_groups.target.arrange(
RIGHT,
buff = MED_LARGE_BUFF,
aligned_edge = DOWN
@@ -759,7 +759,7 @@ class SecondDerivativeAsAcceleration(Scene):
j_words.set_color_by_tex("d^3", j_scene.graph.get_color())
self.a_words.generate_target()
words_group = VGroup(s_words, v_words, self.a_words.target, j_words)
- words_group.arrange_submobjects(
+ words_group.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
diff --git a/old_projects/eoc/old_chapter1.py b/old_projects/eoc/old_chapter1.py
index ba02890ff..72eb56d16 100644
--- a/old_projects/eoc/old_chapter1.py
+++ b/old_projects/eoc/old_chapter1.py
@@ -370,7 +370,7 @@ class IntroduceCircle(Scene):
area.set_color(BLUE)
circumference.set_color(YELLOW)
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.next_to(circle, RIGHT)
words.to_edge(UP)
pi_R, pre_squared = TexMobject("\\pi R", "{}^2")
@@ -389,7 +389,7 @@ class IntroduceCircle(Scene):
)
up_down_arrow = TexMobject("\\Updownarrow")
calc_stuffs = VGroup(derivative, up_down_arrow, integral)
- calc_stuffs.arrange_submobjects(DOWN)
+ calc_stuffs.arrange(DOWN)
calc_stuffs.next_to(words, DOWN, buff = LARGE_BUFF, aligned_edge = LEFT)
brace = Brace(calc_stuffs, RIGHT)
@@ -501,7 +501,7 @@ class PragmatismToArt(Scene):
)
arrow = DoubleArrow(LEFT, RIGHT, color = WHITE)
circle_group = VGroup(circle1, arrow, circle2)
- circle_group.arrange_submobjects()
+ circle_group.arrange()
circle_group.to_corner(UP+LEFT)
circle2.save_state()
circle2.move_to(circle1)
@@ -645,7 +645,7 @@ class IntroduceTinyChangeInArea(CircleScene):
change_in_area,
two_pi_R.target, lp, dR.target.scale(1./0.7), rp
)
- final_area.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ final_area.arrange(RIGHT, buff = SMALL_BUFF)
final_area.next_to(almost_rect, DOWN, buff = MED_LARGE_BUFF)
final_area.set_color(GREEN_A)
final_area[3].set_color(self.dR_color)
@@ -1009,7 +1009,7 @@ class BuildToDADR(CircleScene):
arrow.next_to(d)
ignore_error = TextMobject("Ignore error")
d_group = VGroup(d, arrow, ignore_error)
- d_group.arrange_submobjects()
+ d_group.arrange()
d_group.next_to(
self.pi_creature.get_corner(UP+RIGHT),
buff = LARGE_BUFF
@@ -1293,7 +1293,7 @@ class NameDerivative(IntroduceTinyChangeInArea):
fracs.add(TexMobject("\\cdots \\rightarrow"))
fracs.add(TexMobject("???"))
fracs[-1].set_color_by_gradient(self.dR_color, self.outer_ring.get_color())
- fracs.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ fracs.arrange(RIGHT, buff = MED_LARGE_BUFF)
fracs.to_corner(DOWN+LEFT)
arrows = VGroup()
@@ -1737,7 +1737,7 @@ class IntroduceConcentricRings(CircleScene):
))))
dots_equals_area = TexMobject("\\dots", "=", "\\pi R^2")
area_sum.add(*dots_equals_area)
- area_sum.arrange_submobjects()
+ area_sum.arrange()
area_sum.to_edge(RIGHT)
area_sum.to_edge(UP, buff = MED_SMALL_BUFF)
dots_equals_area[-1].shift(0.1*UP)
@@ -1842,7 +1842,7 @@ class IntroduceConcentricRings(CircleScene):
def_int, self.two_pi_r.target,
self.dr.target, equals_pi_R_squared
)
- integral_expression.arrange_submobjects()
+ integral_expression.arrange()
integral_expression.next_to(brace, DOWN)
self.integral_expression = VGroup(*integral_expression[:-1])
@@ -1923,7 +1923,7 @@ class IntroduceConcentricRings(CircleScene):
self.r_label.save_state()
equals_0 = TexMobject("=0")
r_equals_0 = VGroup(self.r_label.target, equals_0)
- r_equals_0.arrange_submobjects(buff = SMALL_BUFF)
+ r_equals_0.arrange(buff = SMALL_BUFF)
r_equals_0.next_to(self.radial_line.target, UP+LEFT, buff = SMALL_BUFF)
self.play(
MoveToTarget(self.radial_line),
@@ -2270,7 +2270,7 @@ class FundamentalTheorem(CircleScene):
circum_circle.next_to(geometric, RIGHT)
geometric.add(area_circle, circum_circle)
self.derivative_terms = VGroup(symbolic, geometric)
- self.derivative_terms.arrange_submobjects(
+ self.derivative_terms.arrange(
DOWN, buff = LARGE_BUFF, aligned_edge = LEFT
)
self.derivative_terms.next_to(ORIGIN, LEFT, buff = LARGE_BUFF)
@@ -2306,7 +2306,7 @@ class FundamentalTheorem(CircleScene):
geometric.submobjects[-1] = area_circle
self.integral_terms = VGroup(symbolic, geometric)
- self.integral_terms.arrange_submobjects(
+ self.integral_terms.arrange(
DOWN,
buff = LARGE_BUFF,
aligned_edge = LEFT
diff --git a/old_projects/eola/chapter0.py b/old_projects/eola/chapter0.py
index 42227a052..3632cd5b4 100644
--- a/old_projects/eola/chapter0.py
+++ b/old_projects/eola/chapter0.py
@@ -68,7 +68,7 @@ class UpcomingSeriesOfVidoes(Scene):
for icon, color in zip(icons, colors):
icon.set_fill(color, opacity = 1)
icons = VMobject(*icons)
- icons.arrange_submobjects(RIGHT)
+ icons.arrange(RIGHT)
icons.to_edge(LEFT)
icons.shift(UP)
icons = icons.split()
@@ -826,7 +826,7 @@ class TableOfContents(Scene):
"Chapter 9: Eigenvectors and eigenvalues",
"Chapter 10: Abstract vector spaces",
])))
- chapters.arrange_submobjects(DOWN)
+ chapters.arrange(DOWN)
chapters.scale(0.7)
chapters.next_to(h_line, DOWN)
@@ -870,7 +870,7 @@ class TableOfContents(Scene):
for icon, color in zip(icons, colors):
icon.set_fill(color, opacity = 1)
icons = VMobject(*icons)
- icons.arrange_submobjects(RIGHT)
+ icons.arrange(RIGHT)
icons.to_edge(LEFT)
icons.shift(UP)
@@ -910,7 +910,7 @@ class ResourceForTeachers(Scene):
Randolph(color = c)
for c in (BLUE_D, BLUE_C, BLUE_E)
])
- randys.arrange_submobjects(RIGHT)
+ randys.arrange(RIGHT)
randys.scale(0.8)
randys.to_corner(DOWN+LEFT)
@@ -941,7 +941,7 @@ class DifferingBackgrounds(Scene):
for c in (BLUE_D, BLUE_C, BLUE_E)
])
modes = ["pondering", "speaking_looking_left", "sassy"]
- students.arrange_submobjects(RIGHT)
+ students.arrange(RIGHT)
students.scale(0.8)
students.center().to_edge(DOWN)
diff --git a/old_projects/eola/chapter1.py b/old_projects/eola/chapter1.py
index 581ede6b6..0ad6ef631 100644
--- a/old_projects/eola/chapter1.py
+++ b/old_projects/eola/chapter1.py
@@ -49,7 +49,7 @@ class DifferentConceptions(Scene):
compy.title = TextMobject("CS student").to_corner(DOWN+RIGHT)
mathy.title = TextMobject("Mathematician").to_edge(DOWN)
names = VMobject(physy.title, mathy.title, compy.title)
- names.arrange_submobjects(RIGHT, buff = 1)
+ names.arrange(RIGHT, buff = 1)
names.to_corner(DOWN+LEFT)
for pi in creatures:
pi.next_to(pi.title, UP)
@@ -188,7 +188,7 @@ class DifferentConceptions(Scene):
[5, 0, 0, -3],
[2.3, -7.1, 0.1],
])))
- vectors.arrange_submobjects(RIGHT, buff = 1)
+ vectors.arrange(RIGHT, buff = 1)
vectors.to_edge(LEFT)
self.play(
@@ -303,14 +303,14 @@ class DifferentConceptions(Scene):
arrays = VMobject(
v_array, TexMobject("+"), w_array, TexMobject("="), sum_array
)
- arrays.arrange_submobjects(RIGHT)
+ arrays.arrange(RIGHT)
arrays.scale(0.75)
arrays.to_edge(RIGHT).shift(UP)
v_sym = TexMobject("\\vec{\\textbf{v}}")
w_sym = TexMobject("\\vec{\\textbf{w}}")
syms = VMobject(v_sym, TexMobject("+"), w_sym)
- syms.arrange_submobjects(RIGHT)
+ syms.arrange(RIGHT)
syms.center().shift(2*UP)
statement = TextMobject("We'll ignore him \\\\ for now")
@@ -347,7 +347,7 @@ class DifferentConceptions(Scene):
TexMobject("2"), Vector([1, 1]).set_color(YELLOW),
TexMobject("="), Vector([2, 2]).set_color(WHITE)
)
- s_arrows.arrange_submobjects(RIGHT)
+ s_arrows.arrange(RIGHT)
s_arrows.scale(0.75)
s_arrows.next_to(arrows, DOWN)
@@ -357,7 +357,7 @@ class DifferentConceptions(Scene):
TextMobject("="),
matrix_to_mobject(["2(3)", "2(-5)"])
)
- s_arrays.arrange_submobjects(RIGHT)
+ s_arrays.arrange(RIGHT)
s_arrays.scale(0.75)
s_arrays.next_to(arrays, DOWN)
@@ -405,7 +405,7 @@ class HelpsToHaveOneThought(Scene):
Randolph(color = color).scale(0.8)
for color in (BLUE_D, BLUE_C, BLUE_E)
])
- randys.arrange_submobjects(RIGHT)
+ randys.arrange(RIGHT)
randys.to_corner(DOWN+LEFT)
randy = randys.split()[1]
@@ -418,7 +418,7 @@ class HelpsToHaveOneThought(Scene):
array = Matrix([2, 1]).scale(0.5)
q_mark = TextMobject("?")
thought = VMobject(arrow, or_word, array, q_mark)
- thought.arrange_submobjects(RIGHT, buff = 0.2)
+ thought.arrange(RIGHT, buff = 0.2)
thought_bubble.position_mobject_inside(thought)
thought_bubble.set_fill(BLACK, opacity = 1)
@@ -515,7 +515,7 @@ class ListsOfNumbersAddOn(Scene):
arrays = VMobject(*list(map(matrix_to_mobject, [
[-2, 3], [1, 2], [2, -1], [4, 0]
])))
- arrays.arrange_submobjects(buff = 0.4)
+ arrays.arrange(buff = 0.4)
arrays.scale(2)
self.play(Write(arrays))
self.wait(2)
@@ -975,7 +975,7 @@ class ShowScalarMultiplication(VectorScene):
scalars = VMobject(*list(map(TexMobject, [
"2,", "\\dfrac{1}{3},", "-1.8,", "\\dots"
])))
- scalars.arrange_submobjects(RIGHT, buff = 0.4)
+ scalars.arrange(RIGHT, buff = 0.4)
scalars.next_to(scaling_word, DOWN, aligned_edge = LEFT)
scalars_word = TextMobject("``Scalars''")
scalars_word.next_to(scalars, DOWN, aligned_edge = LEFT)
@@ -1062,9 +1062,9 @@ class FollowingVideos(UpcomingSeriesOfVidoes):
TexMobject("="),
Vector([2, 2], color = WHITE)
)
- scalar_multiplication.arrange_submobjects(RIGHT)
+ scalar_multiplication.arrange(RIGHT)
both = VMobject(v_sum, scalar_multiplication)
- both.arrange_submobjects(RIGHT, buff = 1)
+ both.arrange(RIGHT, buff = 1)
both.shift(2*DOWN)
self.add(both)
@@ -1101,9 +1101,9 @@ class ItDoesntMatterWhich(Scene):
array = matrix_to_mobject([2, 1])
goes_to = TexMobject("\\Rightarrow")
physy_statement = VMobject(arrow, goes_to, array)
- physy_statement.arrange_submobjects(RIGHT)
+ physy_statement.arrange(RIGHT)
compy_statement = physy_statement.copy()
- compy_statement.arrange_submobjects(LEFT)
+ compy_statement.arrange(LEFT)
physy_speech.position_mobject_inside(physy_statement)
compy_speech.position_mobject_inside(compy_statement)
@@ -1118,7 +1118,7 @@ class ItDoesntMatterWhich(Scene):
TexMobject("\\Leftrightarrow"),
matrix_to_mobject([2, 1])
)
- back_and_forth.arrange_submobjects(LEFT).center()
+ back_and_forth.arrange(LEFT).center()
self.wait()
diff --git a/old_projects/eola/chapter10.py b/old_projects/eola/chapter10.py
index cd851c61d..1118fcac4 100644
--- a/old_projects/eola/chapter10.py
+++ b/old_projects/eola/chapter10.py
@@ -769,7 +769,7 @@ class SymbolicEigenvectors(Scene):
scaling_by = VGroup(
TextMobject("Scaling by "), lamb_copy
)
- scaling_by.arrange_submobjects()
+ scaling_by.arrange()
arrow = TexMobject("\\Updownarrow")
matrix_multiplication = TextMobject(
"Matrix multiplication by"
@@ -779,7 +779,7 @@ class SymbolicEigenvectors(Scene):
corner_group = VGroup(
scaling_by, arrow, matrix_multiplication, matrix
)
- corner_group.arrange_submobjects(DOWN)
+ corner_group.arrange(DOWN)
corner_group.to_corner(UP+RIGHT)
q_marks = VGroup(*[
@@ -845,7 +845,7 @@ class SymbolicEigenvectors(Scene):
VGroup(
l_paren, lamb.target, id_text.target,
r_paren, v2.target
- ).arrange_submobjects().next_to(equals).shift(SMALL_BUFF*UP)
+ ).arrange().next_to(equals).shift(SMALL_BUFF*UP)
self.play(
Write(parens),
*list(map(MoveToTarget, [lamb, id_text, v2]))
@@ -874,7 +874,7 @@ class SymbolicEigenvectors(Scene):
VGroup(
A.target, v1.target, minus,
lamb_group.target, v2.target
- ).arrange_submobjects().next_to(equals, LEFT)
+ ).arrange().next_to(equals, LEFT)
self.play(
Write(zero),
Write(minus),
@@ -1182,7 +1182,7 @@ class LineOfReasoning(Scene):
("(", "A", "-", "\\lambda", "I)", v_tex, "=", "0"),
("\\det(A-", "\\lambda", "I)", "=", "0")
]))
- expressions.arrange_submobjects(DOWN, buff = LARGE_BUFF/2.)
+ expressions.arrange(DOWN, buff = LARGE_BUFF/2.)
for expression in expressions:
for i, expression_part in enumerate(expression.expression_parts):
if expression_part == "=":
@@ -1220,7 +1220,7 @@ class RevisitExampleTransformation(ExampleTranformationScene):
lamb = TexMobject("\\lambda")
lamb.set_color(MAROON_B)
words = VGroup(seeking_eigenvalue, lamb)
- words.arrange_submobjects()
+ words.arrange()
words.next_to(self.matrix, DOWN, buff = LARGE_BUFF)
self.play(Write(words))
self.wait()
@@ -1289,10 +1289,10 @@ class RevisitExampleTransformation(ExampleTranformationScene):
mover.target = mover.copy()
minus1, minus2 = [TexMobject("-") for x in range(2)]
new_three = VGroup(three.target, minus1, lamb.target)
- new_three.arrange_submobjects()
+ new_three.arrange()
new_three.move_to(three)
new_two = VGroup(two.target, minus2, lamb_copy.target)
- new_two.arrange_submobjects()
+ new_two.arrange()
new_two.move_to(two)
l_bracket.target.next_to(VGroup(new_three, new_two), LEFT)
r_bracket.target.next_to(VGroup(new_three, new_two), RIGHT)
@@ -1328,7 +1328,7 @@ class RevisitExampleTransformation(ExampleTranformationScene):
lp1, three_minus_lamb.target, rp1,
lp2, two_minus_lamb.target, rp2,
minus, one.target, cdot, zero.target
- ).arrange_submobjects().next_to(equals)
+ ).arrange().next_to(equals)
parens.add_background_rectangle()
new_rect = BackgroundRectangle(VGroup(minus, zero.target))
@@ -1561,7 +1561,7 @@ class SolveRotationEigenvalues(Rotate90Degrees):
lp1, entries[0].target, rp1,
lp2, entries[1].target, rp2,
)
- group.arrange_submobjects()
+ group.arrange()
group.next_to(sym)
parens.add_background_rectangle()
self.play(
@@ -1645,7 +1645,7 @@ class ShearExample(RevisitExampleTransformation):
for word in words:
word.set_color_by_tex("1", MAROON_B)
word.add_to_back(BackgroundRectangle(word))
- words.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ words.arrange(DOWN, buff = MED_SMALL_BUFF)
words.next_to(ORIGIN, DOWN+RIGHT, buff = MED_SMALL_BUFF)
self.play(ShowCreation(vectors), run_time = 2)
self.play(Write(words))
@@ -1668,7 +1668,7 @@ class ShearExample(RevisitExampleTransformation):
lp1, three_minus_lamb.target, rp1,
lp2, two_minus_lamb.target, rp2,
minus, one.target, cdot, zero.target
- ).arrange_submobjects().next_to(equals)
+ ).arrange().next_to(equals)
parens.add_background_rectangle()
new_rect = BackgroundRectangle(VGroup(minus, zero.target))
@@ -1794,7 +1794,7 @@ class IntroduceEigenbasis(TeacherStudentsScene):
)
self.random_blink()
new_words = VGroup(words1.copy(), words2)
- new_words.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ new_words.arrange(DOWN, buff = MED_SMALL_BUFF)
new_words.scale(0.8)
self.teacher.bubble.add_content(new_words)
self.play(
@@ -2014,7 +2014,7 @@ class RepeatedMultilpicationOfMatrices(Scene):
])
last_matrix = matrices[-1]
group = VGroup(*list(matrices) + [vector])
- group.arrange_submobjects()
+ group.arrange()
brace = Brace(matrices)
brace_text = brace.get_text("100", "times")
diff --git a/old_projects/eola/chapter11.py b/old_projects/eola/chapter11.py
index 5adb1c139..b2c489d50 100644
--- a/old_projects/eola/chapter11.py
+++ b/old_projects/eola/chapter11.py
@@ -131,7 +131,7 @@ class WhatIsA2DVector(LinearTransformationScene):
mob.target.scale(0.7)
arrow = TexMobject("\\Rightarrow")
group = VGroup(v.target, arrow, coords.target)
- group.arrange_submobjects(vect)
+ group.arrange(vect)
student.bubble.add_content(group)
student.v, student.coords = v.copy(), coords.copy()
student.arrow = arrow
@@ -151,7 +151,7 @@ class WhatIsA2DVector(LinearTransformationScene):
v.target = v.copy()
coords.target = coords.copy()
group = VGroup(v.target, coords.target)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.set_height(coords.get_height())
group.next_to(student.arrow, RIGHT)
student.q_marks = TexMobject("???")
@@ -202,7 +202,7 @@ class HigherDimensionalVectorsNumerically(Scene):
"5D vector",
"100D vector",
])))
- words.arrange_submobjects(RIGHT, buff = LARGE_BUFF*2)
+ words.arrange(RIGHT, buff = LARGE_BUFF*2)
words.to_edge(UP)
vectors = VGroup(*list(map(Matrix, [
[3, 1, 4, 1],
@@ -724,7 +724,7 @@ class AddTwoFunctions(FunctionGraphScene):
[input_mob.copy()],
TexMobject(")")
))
- result.arrange_submobjects()
+ result.arrange()
result[0].set_color(self.graph_colors[2])
VGroup(result[5], result[7]).set_color(self.graph_colors[0])
VGroup(result[9], result[11]).set_color(self.graph_colors[1])
@@ -774,7 +774,7 @@ class AddVectorsCoordinateByCoordinate(Scene):
v.get_entries()[1].set_color(Y_COLOR)
v.get_entries()[2].set_color(Z_COLOR)
plus, equals = TexMobject("+=")
- VGroup(v1, plus, v2, equals, v_sum).arrange_submobjects()
+ VGroup(v1, plus, v2, equals, v_sum).arrange()
self.add(v1, plus, v2)
self.wait()
@@ -832,7 +832,7 @@ class ScaleVectorByCoordinates(Scene):
])
v2.get_brackets()[0].next_to(two_targets, LEFT)
v2.add(two_targets)
- VGroup(two, dot, v1, equals, v2).arrange_submobjects()
+ VGroup(two, dot, v1, equals, v2).arrange()
self.add(two, dot, v1)
self.play(
@@ -923,7 +923,7 @@ class FromVectorsToFunctions(VectorScene):
]
])
words.set_color_by_gradient(BLUE_B, BLUE_D)
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.to_corner(UP+LEFT)
self.play(FadeIn(
words,
@@ -966,7 +966,7 @@ class FromVectorsToFunctions(VectorScene):
L, lp, func_tex.target, rp,
equals, new_func
)
- group.arrange_submobjects()
+ group.arrange()
group.shift(2*UP).to_edge(LEFT, buff = MED_LARGE_BUFF)
rect = BackgroundRectangle(group)
group.add_to_back(rect)
@@ -1107,13 +1107,13 @@ class FormalDefinitionOfLinear(LinearTransformationScene):
word.set_color_by_tex(v_tex, YELLOW)
word.set_color_by_tex(w_tex, MAROON_B)
word.set_color_by_tex("c", GREEN)
- words.arrange_submobjects()
+ words.arrange()
words.lhs = words[1]
words.rhs = words[2]
words.add_to_back(BackgroundRectangle(words))
# words.scale(0.8)
properties.add(words)
- properties.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
+ properties.arrange(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
properties.next_to(h_line, DOWN, buff = MED_LARGE_BUFF).to_edge(LEFT)
self.play(Write(title), ShowCreation(h_line))
@@ -1140,7 +1140,7 @@ class FormalDefinitionOfLinear(LinearTransformationScene):
w_label_copy.generate_target()
plus = TexMobject("+")
vw_label = VGroup(v_label_copy.target, plus, w_label_copy.target)
- vw_label.arrange_submobjects()
+ vw_label.arrange()
vw_label.next_to(vw_sum.get_end(), RIGHT)
self.play(
MoveToTarget(v_label_copy),
@@ -1163,7 +1163,7 @@ class FormalDefinitionOfLinear(LinearTransformationScene):
vw_label_copy,
TexMobject(")").scale(0.8),
)
- vw_label.target.arrange_submobjects()
+ vw_label.target.arrange()
for mob in vw_label, vw_label.target:
mob.add_to_back(BackgroundRectangle(mob))
@@ -1184,7 +1184,7 @@ class FormalDefinitionOfLinear(LinearTransformationScene):
equals, v_label_copy.target,
plus, w_label_copy.target
)
- rhs.arrange_submobjects()
+ rhs.arrange()
rhs.next_to(vw_label, RIGHT)
rect = BackgroundRectangle(rhs)
self.play(*it.chain(
@@ -1347,7 +1347,7 @@ class DerivativeIsLinear(Scene):
def show_additivity(self):
general, deriv = self.additivity, self.deriv_additivity
group = VGroup(general, deriv )
- group.arrange_submobjects(DOWN, buff = 1.5)
+ group.arrange(DOWN, buff = 1.5)
inner_sum = VGroup(*deriv[2:2+3])
outer_sum_deriv = VGroup(deriv[0], deriv[1], deriv[5])
@@ -1371,7 +1371,7 @@ class DerivativeIsLinear(Scene):
def show_scaling(self):
general, deriv = self.scaling, self.deriv_scaling
group = VGroup(general, deriv)
- group.arrange_submobjects(DOWN, buff = 1.5)
+ group.arrange(DOWN, buff = 1.5)
inner_scaling = VGroup(*deriv[2:4])
lhs_deriv = VGroup(deriv[0], deriv[1], deriv[4])
@@ -1423,7 +1423,7 @@ class PolynomialsHaveArbitrarilyLargeDegree(Scene):
"\\vdots"
])))
polys.set_color_by_gradient(BLUE_B, BLUE_D)
- polys.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ polys.arrange(DOWN, buff = MED_LARGE_BUFF)
polys.scale(1.3)
arrow = TexMobject("\\Rightarrow").scale(1.5)
@@ -1473,7 +1473,7 @@ class GeneneralPolynomialCoordinates(Scene):
equals = TexMobject("=").scale(1.3)
group = VGroup(poly, equals, array)
- group.arrange_submobjects()
+ group.arrange()
group.to_edge(RIGHT)
pre_entries = VGroup(
@@ -1529,7 +1529,7 @@ class IntroducePolynomialSpace(Scene):
TexMobject("\\vdots"),
)
polys.set_color_by_gradient(BLUE_B, BLUE_D)
- polys.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ polys.arrange(DOWN, buff = MED_SMALL_BUFF)
polys.next_to(cloud.get_top(), DOWN, buff = MED_LARGE_BUFF)
self.play(ShowCreation(cloud))
@@ -1592,7 +1592,7 @@ class IntroducePolynomialSpace(Scene):
x_cubed
).copy()
basis_group.generate_target()
- basis_group.target.arrange_submobjects(
+ basis_group.target.arrange(
DOWN, buff = 0.75*LARGE_BUFF, aligned_edge = LEFT
)
basis_group.target.to_edge(RIGHT, buff = MED_LARGE_BUFF)
@@ -1719,7 +1719,7 @@ class IntroducePolynomialSpace(Scene):
##Horrible
last_col = VGroup(*matrix.get_mob_matrix()[:,-1])
last_col_top = last_col.get_top()
- last_col.arrange_submobjects(DOWN, buff = 0.83)
+ last_col.arrange(DOWN, buff = 0.83)
last_col.move_to(last_col_top, aligned_edge = UP+RIGHT)
##End horrible
matrix.set_column_colors(X_COLOR, Y_COLOR, Z_COLOR, MAROON_B)
@@ -1813,7 +1813,7 @@ class IntroducePolynomialSpace(Scene):
entry.generate_target()
diag_entry.generate_target()
group = VGroup(diag_entry.target, dot, entry.target)
- group.arrange_submobjects()
+ group.arrange()
result_entries.append(group)
result_array = Matrix(
result_entries + [
@@ -1873,12 +1873,12 @@ class MatrixVectorMultiplicationAndDerivative(TeacherStudentsScene):
Matrix([[3, 1], [0, 2]]).set_column_colors(X_COLOR, Y_COLOR),
Matrix(["x", "y"]).set_column_colors(YELLOW)
)
- mv_mult.arrange_submobjects()
+ mv_mult.arrange()
mv_mult.scale(0.75)
arrow = TexMobject("\\Leftrightarrow")
deriv = TexMobject("\\dfrac{df}{dx}")
group = VGroup(mv_mult, arrow, deriv)
- group.arrange_submobjects(buff = MED_SMALL_BUFF)
+ group.arrange(buff = MED_SMALL_BUFF)
arrow.set_color(BLACK)
teacher = self.get_teacher()
@@ -1939,7 +1939,7 @@ class CompareTermsInLinearAlgebraToFunction(Scene):
"Eigenfunctions",
])))
for concepts, vect in (lin_alg_concepts, LEFT), (function_concepts, RIGHT):
- concepts.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
+ concepts.arrange(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
concepts.next_to(h_line, DOWN, buff = LARGE_BUFF)
concepts.shift(vect*FRAME_X_RADIUS/2)
concepts.set_color_by_gradient(YELLOW_B, YELLOW_C)
@@ -2020,9 +2020,9 @@ class YouAsAMathematician(Scene):
tex.set_color_by_tex("\\lambda", MAROON_B)
lhs = VGroup(eigen_equation, v_ne_zero)
- lhs.arrange_submobjects(DOWN)
+ lhs.arrange(DOWN)
group = VGroup(lhs, arrow, det_equation)
- group.arrange_submobjects(buff = MED_SMALL_BUFF)
+ group.arrange(buff = MED_SMALL_BUFF)
return group
class ShowVectorSpaces(Scene):
@@ -2075,8 +2075,8 @@ class ShowVectorSpaces(Scene):
for x in range(3)
])
for subgroup in arrays:
- subgroup.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
- arrays.arrange_submobjects(RIGHT)
+ subgroup.arrange(DOWN, buff = MED_SMALL_BUFF)
+ arrays.arrange(RIGHT)
arrays.scale(0.7)
arrays.set_color_by_gradient(YELLOW, MAROON_B)
return arrays
@@ -2107,7 +2107,7 @@ class ToolsOfLinearAlgebra(Scene):
"Dot products",
"$\\vdots$"
])))
- words.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
+ words.arrange(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
words[-1].next_to(words[-2], DOWN)
self.play(FadeIn(
words,
@@ -2123,7 +2123,7 @@ class MathematicianSpeakingToAll(Scene):
Randolph().flip().set_color(color)
for color in (BLUE_D, GREEN_E, GOLD_E, BLUE_C)
])
- others.arrange_submobjects()
+ others.arrange()
others.scale(0.8)
others.to_corner(DOWN+RIGHT)
@@ -2220,7 +2220,7 @@ class ListAxioms(Scene):
for axiom in axioms:
for tex, color in tex_color_pairs:
axiom.set_color_by_tex(tex, color)
- axioms.arrange_submobjects(
+ axioms.arrange(
DOWN, buff = MED_LARGE_BUFF,
aligned_edge = LEFT
)
@@ -2253,8 +2253,8 @@ class AxiomsAreInterface(Scene):
VGroup(*others[2:]),
)
for group in others:
- group.arrange_submobjects(RIGHT)
- others.arrange_submobjects(DOWN)
+ group.arrange(RIGHT)
+ others.arrange(DOWN)
others.scale(0.8)
others.to_edge(RIGHT)
VGroup(mathy, others).to_edge(DOWN)
@@ -2300,9 +2300,9 @@ class VectorSpaceOfPiCreatures(Scene):
VGroup(*[
PiCreature()
for x in range(4)
- ]).arrange_submobjects(RIGHT, buff = 1.5)
+ ]).arrange(RIGHT, buff = 1.5)
for y in range(4)
- ]).arrange_submobjects(DOWN, buff = 1.5)
+ ]).arrange(DOWN, buff = 1.5)
creatures = VGroup(*it.chain(*creatures))
creatures.set_height(FRAME_HEIGHT-1)
for pi in creatures:
@@ -2357,7 +2357,7 @@ class VectorSpaceOfPiCreatures(Scene):
pi1.target, plus, pi2.target,
equals, sum_pi
)
- sum_equation.arrange_submobjects().center()
+ sum_equation.arrange().center()
scaled_pi3 = pi3.copy().scale(2)
equals2 = TexMobject("=")
@@ -2365,9 +2365,9 @@ class VectorSpaceOfPiCreatures(Scene):
scale_equation = VGroup(
two, pi3.target, equals2, scaled_pi3
)
- scale_equation.arrange_submobjects()
+ scale_equation.arrange()
- VGroup(sum_equation, scale_equation).arrange_submobjects(
+ VGroup(sum_equation, scale_equation).arrange(
DOWN, buff = MED_SMALL_BUFF
)
@@ -2492,7 +2492,7 @@ class WhatIsThree(Scene):
if isinstance(group, TexMobject):
pass
elif isinstance(group[0], Vector):
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.set_color_by_gradient(YELLOW, MAROON_B)
else:
m1, m2, m3 = group
diff --git a/old_projects/eola/chapter2.py b/old_projects/eola/chapter2.py
index a471f791c..593376491 100644
--- a/old_projects/eola/chapter2.py
+++ b/old_projects/eola/chapter2.py
@@ -133,7 +133,7 @@ class CoordinatesAsScalars(VectorScene):
scaled_v = Vector(factor*v.get_end(), color = v.get_color())
scaled_label = VMobject(coord.copy(), label.copy())
- scaled_label.arrange_submobjects(RIGHT, buff = 0.1)
+ scaled_label.arrange(RIGHT, buff = 0.1)
scaled_label.move_to(label, DOWN+RIGHT)
scaled_label.shift((scaled_v.get_end()-v.get_end())/2)
coord_copy = coord.copy()
@@ -445,7 +445,7 @@ class NameLinearCombinations(Scene):
equation = TexMobject([
"a", "\\vec{\\textbf{v}}", "+", "b", "\\vec{\\textbf{w}}"
])
- equation.arrange_submobjects(buff = 0.1, aligned_edge = DOWN)
+ equation.arrange(buff = 0.1, aligned_edge = DOWN)
equation.split()[1].set_color(v_color)
equation.split()[4].set_color(w_color)
a, b = np.array(equation.split())[[0, 3]]
@@ -591,7 +591,7 @@ class DefineSpan(Scene):
equation = TexMobject([
"a", "\\vec{\\textbf{v}}", "+", "b", "\\vec{\\textbf{w}}"
])
- equation.arrange_submobjects(buff = 0.1, aligned_edge = DOWN)
+ equation.arrange(buff = 0.1, aligned_edge = DOWN)
equation.split()[1].set_color(v_color)
equation.split()[4].set_color(w_color)
a, b = np.array(equation.split())[[0, 3]]
diff --git a/old_projects/eola/chapter3.py b/old_projects/eola/chapter3.py
index 703420123..11af086f2 100644
--- a/old_projects/eola/chapter3.py
+++ b/old_projects/eola/chapter3.py
@@ -104,7 +104,7 @@ class DescribeTransformation(Scene):
for num in nums
])
for mob in num_inputs, num_outputs:
- mob.arrange_submobjects(DOWN, buff = 1)
+ mob.arrange(DOWN, buff = 1)
num_inputs.next_to(f_of_x, LEFT, buff = 1)
num_outputs.next_to(f_of_x, RIGHT, buff = 1)
f_point = VectorizedPoint(f_of_x.get_center())
@@ -841,7 +841,7 @@ class DeduceResultWithGeneralCoordinates(Scene):
y.copy(), j_coords.copy(), equals,
result
)
- vect_group.arrange_submobjects(RIGHT, buff = 0.1)
+ vect_group.arrange(RIGHT, buff = 0.1)
self.add(i_group, j_group)
for mob in vect_group.split():
@@ -979,7 +979,7 @@ class MatrixVectorMultiplication(LinearTransformationScene):
formula = VMobject(
v1.copy(), col1, TexMobject("+"), v2.copy(), col2
)
- formula.arrange_submobjects(RIGHT, buff = 0.1)
+ formula.arrange(RIGHT, buff = 0.1)
formula.center()
formula_start = VMobject(
v1.copy(),
@@ -1012,7 +1012,7 @@ class MatrixVectorMultiplication(LinearTransformationScene):
row1 = VMobject(*list(map(TexMobject, row1)))
row2 = VMobject(*list(map(TexMobject, row2)))
for row in row1, row2:
- row.arrange_submobjects(RIGHT, buff = 0.1)
+ row.arrange(RIGHT, buff = 0.1)
final_sum = Matrix([row1, row2])
row1, row2 = final_sum.get_mob_matrix().flatten()
row1.split()[0].set_color(X_COLOR)
@@ -1033,7 +1033,7 @@ class MatrixVectorMultiplication(LinearTransformationScene):
def reposition_matrix_and_vector(self, matrix, vector, formula):
start_state = VMobject(matrix, vector)
end_state = start_state.copy()
- end_state.arrange_submobjects(RIGHT, buff = 0.1)
+ end_state.arrange(RIGHT, buff = 0.1)
equals = TexMobject("=")
equals.next_to(formula, LEFT)
end_state.next_to(equals, LEFT)
@@ -1419,7 +1419,7 @@ class UsedToThinkinfOfFunctionsAsGraphs(VectorScene):
def show_inputs_and_output(self):
numbers = list(range(-3, 4))
inputs = VMobject(*list(map(TexMobject, list(map(str, numbers)))))
- inputs.arrange_submobjects(DOWN, buff = 0.5, aligned_edge = RIGHT)
+ inputs.arrange(DOWN, buff = 0.5, aligned_edge = RIGHT)
arrows = VMobject(*[
Arrow(LEFT, RIGHT).next_to(mob)
for mob in inputs.split()
diff --git a/old_projects/eola/chapter4.py b/old_projects/eola/chapter4.py
index 794820523..c5911826d 100644
--- a/old_projects/eola/chapter4.py
+++ b/old_projects/eola/chapter4.py
@@ -126,10 +126,10 @@ class FollowLinearCombination(LinearTransformationScene):
for mob in scaled_i, scaled_j:
mob.fade(0.3)
scaled_i_label_target = scaled_i_label.copy()
- scaled_i_label_target.arrange_submobjects(buff = 0.1)
+ scaled_i_label_target.arrange(buff = 0.1)
scaled_i_label_target.next_to(scaled_i, DOWN)
scaled_j_label_target = scaled_j_label.copy()
- scaled_j_label_target.arrange_submobjects(buff = 0.1)
+ scaled_j_label_target.arrange(buff = 0.1)
scaled_j_label_target.next_to(scaled_j, LEFT)
self.show_scaled_vectors(vect_array, vect_coords, i_label, j_label)
@@ -146,10 +146,10 @@ class FollowLinearCombination(LinearTransformationScene):
for mob in scaled_i, scaled_j:
mob.fade(0.3)
scaled_i_label_target = scaled_i_label.copy()
- scaled_i_label_target.arrange_submobjects(buff = 0.1)
+ scaled_i_label_target.arrange(buff = 0.1)
scaled_i_label_target.next_to(scaled_i.get_center(), DOWN)
scaled_j_label_target = scaled_j_label.copy()
- scaled_j_label_target.arrange_submobjects(buff = 0.1)
+ scaled_j_label_target.arrange(buff = 0.1)
scaled_j_label_target.next_to(scaled_j.get_center(), LEFT)
self.play(
@@ -189,7 +189,7 @@ class FollowLinearCombination(LinearTransformationScene):
)
post_formula = pre_formula.copy()
pre_formula.split()[2].fade(1)
- post_formula.arrange_submobjects(buff = 0.1)
+ post_formula.arrange(buff = 0.1)
post_formula.next_to(vect, DOWN)
background = BackgroundRectangle(post_formula)
everything = self.get_mobjects()
@@ -239,7 +239,7 @@ class RotationThenShear(LinearTransformationScene):
shear_words = TextMobject("followed by a shear")
rot_words.set_color(YELLOW)
shear_words.set_color(PINK)
- VMobject(rot_words, shear_words).arrange_submobjects(DOWN).to_edge(UP)
+ VMobject(rot_words, shear_words).arrange(DOWN).to_edge(UP)
for words in rot_words, shear_words:
words.add_background_rectangle()
@@ -388,7 +388,7 @@ class ExplainWhyItsMatrixMultiplication(Scene):
long_way = VMobject(
shear_matrix, l_paren, rot_matrix, vect, r_paren
)
- long_way.arrange_submobjects(buff = 0.1)
+ long_way.arrange(buff = 0.1)
long_way.to_edge(LEFT).shift(UP)
equals = TexMobject("=").next_to(long_way, RIGHT)
@@ -397,7 +397,7 @@ class ExplainWhyItsMatrixMultiplication(Scene):
comp_matrix.set_column_colors(X_COLOR, Y_COLOR)
vect_copy = vect.copy()
short_way = VMobject(comp_matrix, vect_copy)
- short_way.arrange_submobjects(buff = 0.1)
+ short_way.arrange(buff = 0.1)
short_way.next_to(equals, RIGHT)
pairs = [
@@ -426,7 +426,7 @@ class ExplainWhyItsMatrixMultiplication(Scene):
comp_matrix.add(equals)
matrices = VMobject(shear_matrix, rot_matrix, comp_matrix)
self.play(ApplyMethod(
- matrices.arrange_submobjects, buff = 0.1,
+ matrices.arrange, buff = 0.1,
aligned_edge = UP
))
self.wait()
@@ -513,7 +513,7 @@ class MoreComplicatedExampleVisually(LinearTransformationScene):
comp_matrix = VMobject(BackgroundRectangle(comp_matrix), comp_matrix)
VMobject(
m2_mob, m1_mob, comp_matrix
- ).arrange_submobjects(buff = 0.1).to_corner(UP+LEFT).shift(DOWN)
+ ).arrange(buff = 0.1).to_corner(UP+LEFT).shift(DOWN)
for i, mob in enumerate([m1_mob, m2_mob]):
brace = Brace(mob, UP)
@@ -590,7 +590,7 @@ class MoreComplicatedExampleNumerically(MoreComplicatedExampleVisually):
Matrix(new_m2_copy.get_mob_matrix()[:,1]),
TexMobject("=")
)
- intermediate.arrange_submobjects(buff = 0.1)
+ intermediate.arrange(buff = 0.1)
intermediate.next_to(col_vect, RIGHT)
product = Matrix(result[:,i])
@@ -866,7 +866,7 @@ class AskAssociativityQuestion(Scene):
point = VectorizedPoint()
start = VMobject(*[m.copy() for m in (point, a, b, point, c)])
for mob in lhs, rhs, start:
- mob.arrange_submobjects(buff = 0.1)
+ mob.arrange(buff = 0.1)
a, lp, b, c, rp = rhs.split()
rhs = VMobject(lp, a, b, rp, c)##Align order to lhs
eq = TexMobject("=")
@@ -906,7 +906,7 @@ class AskAssociativityQuestion(Scene):
np.array(list(m)).reshape((2, 2))
for m in ("abcd", "efgh", "ijkl")
]))
- VMobject(*matrices).arrange_submobjects()
+ VMobject(*matrices).arrange()
self.play(everything.to_edge, UP)
for letter, matrix in zip([a, b, c], matrices):
@@ -937,7 +937,7 @@ class AskAssociativityQuestion(Scene):
m.copy() for m in (m1, lp, m2, m3, rp)
])
for state in state2, state3:
- state.arrange_submobjects(RIGHT, buff = 0.1)
+ state.arrange(RIGHT, buff = 0.1)
m1, lp, m2, m3, rp = state3.split()
state3 = VMobject(lp, m1, m2, rp, m3)
diff --git a/old_projects/eola/chapter5.py b/old_projects/eola/chapter5.py
index c91b69fe6..6b9bc7330 100644
--- a/old_projects/eola/chapter5.py
+++ b/old_projects/eola/chapter5.py
@@ -186,7 +186,7 @@ class DiagonalExample(LinearTransformationScene):
equation = VMobject(
words, width_target, times, height_target, eq_det
)
- equation.arrange_submobjects(RIGHT, buff = 0.2)
+ equation.arrange(RIGHT, buff = 0.2)
equation.next_to(self.square, UP, aligned_edge = LEFT)
equation.shift(0.5*RIGHT)
background_rect = BackgroundRectangle(equation)
@@ -346,7 +346,7 @@ class NameDeterminant(LinearTransformationScene):
)
if det < 1 and det > 0:
area_label_target.scale(det)
- area_label_target.arrange_submobjects(RIGHT, buff = 0.1)
+ area_label_target.arrange(RIGHT, buff = 0.1)
self.add_moving_mobject(area_label, area_label_target)
self.wait()
@@ -414,7 +414,7 @@ class NextFewVideos(Scene):
icon.set_fill(WHITE, opacity = 1)
icons = VMobject(*[icon.copy() for x in range(10)])
icons.set_submobject_colors_by_gradient(BLUE_A, BLUE_D)
- icons.arrange_submobjects(RIGHT)
+ icons.arrange(RIGHT)
icons.to_edge(LEFT)
self.play(
@@ -1046,7 +1046,7 @@ class ThreeDDetFormula(Scene):
])
parts = list(parts)
for part in parts:
- part.arrange_submobjects(RIGHT, buff = 0.2)
+ part.arrange(RIGHT, buff = 0.2)
parts[1].next_to(parts[0], RIGHT)
parts[2].next_to(parts[1], DOWN, aligned_edge = LEFT)
parts[3].next_to(parts[2], DOWN, aligned_edge = LEFT)
diff --git a/old_projects/eola/chapter6.py b/old_projects/eola/chapter6.py
index 5b5b67aeb..36b8e9316 100644
--- a/old_projects/eola/chapter6.py
+++ b/old_projects/eola/chapter6.py
@@ -31,7 +31,7 @@ class ListTerms(Scene):
"Rank",
"Null space",
])))
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.next_to(title, DOWN, aligned_edge = LEFT)
words.shift(RIGHT)
@@ -108,7 +108,7 @@ class UsefulnessOfMatrices(Scene):
m.copy().set_color(c)
for m, c in zip(syms.split(), [X_COLOR, Y_COLOR, Z_COLOR])
])
- new_syms.arrange_submobjects(RIGHT, buff = 0.5)
+ new_syms.arrange(RIGHT, buff = 0.5)
new_syms.next_to(equations, LEFT, buff = 3)
sym_brace = Brace(new_syms, DOWN)
unknowns = sym_brace.get_text("Unknown variables")
@@ -198,10 +198,10 @@ class MachineLearningNetwork(Scene):
sym = TexMobject("x_{%d, %d}"%(i, j))
sym.move_to(mob)
mob.add(sym)
- layer.arrange_submobjects(DOWN, buff = 0.5)
+ layer.arrange(DOWN, buff = 0.5)
layer.center()
layers.append(layer)
- VMobject(*layers).arrange_submobjects(RIGHT, buff = 1.5)
+ VMobject(*layers).arrange(RIGHT, buff = 1.5)
lines = VMobject()
for l_layer, r_layer in zip(layers, layers[1:]):
for l_node, r_node in it.product(l_layer.split(), r_layer.split()):
@@ -254,14 +254,14 @@ class SystemOfEquations(Scene):
[v.copy() for v in variables],
list(map(TexMobject, list("++=")))
))))
- equation.arrange_submobjects(
+ equation.arrange(
RIGHT, buff = 0.1,
aligned_edge = DOWN
)
equation.split()[4].shift(0.1*DOWN)
equation.split()[-1].next_to(equation.split()[-2], RIGHT)
equations.add(equation)
- equations.arrange_submobjects(DOWN, aligned_edge = RIGHT)
+ equations.arrange(DOWN, aligned_edge = RIGHT)
for eq, rhs_elem in zip(equations.split(), rhs):
rhs_elem.next_to(eq, RIGHT)
eq.add(rhs_elem)
@@ -428,7 +428,7 @@ class SystemOfEquations(Scene):
v_array = Matrix(copy.deepcopy(rhs_entries))
equals = TexMobject("=")
ax_equals_v = VMobject(matrix, x_array, equals, v_array)
- ax_equals_v.arrange_submobjects(RIGHT)
+ ax_equals_v.arrange(RIGHT)
ax_equals_v.to_edge(RIGHT)
all_brackets = [
mob.get_brackets()
@@ -505,7 +505,7 @@ class SystemOfEquations(Scene):
2, TexMobject("=").next_to(x_array, RIGHT)
)
compact_equation.target = compact_equation.copy()
- compact_equation.target.arrange_submobjects(buff = 0.1)
+ compact_equation.target.arrange(buff = 0.1)
compact_equation.target.to_edge(UP)
self.play(Transform(
@@ -618,7 +618,7 @@ class SystemOfTwoEquationsTwoUnknowns(Scene):
matrix_system = VMobject(
matrix, x, TexMobject("="), v
)
- matrix_system.arrange_submobjects(RIGHT)
+ matrix_system.arrange(RIGHT)
matrix_system.next_to(system, DOWN, buff = 1)
matrix.label = "A"
matrix.label_color = WHITE
@@ -1222,7 +1222,7 @@ class DefineColumnSpace(Scene):
right_words[0].set_color(left_words[1].get_color())
everyone = VMobject(left_words, arrow, right_words)
- everyone.arrange_submobjects(RIGHT)
+ everyone.arrange(RIGHT)
everyone.to_edge(UP)
self.play(Write(left_words))
@@ -1289,7 +1289,7 @@ class TowDColumnsDontSpan(LinearTransformationScene):
TexMobject("\\Updownarrow"),
TextMobject("``Column space''")
)
- words.arrange_submobjects(DOWN, buff = 0.1)
+ words.arrange(DOWN, buff = 0.1)
words.next_to(brace, DOWN)
words[0][0].set_color(PINK)
words[2].set_color(TEAL)
@@ -1385,14 +1385,14 @@ class NameColumnSpace(Scene):
for col_array, index in zip(col_arrays, [2, 4, 6]):
col_array.replace(span_text[index], dim_to_match = 1)
span_text.submobjects[index] = col_array
- span_text.arrange_submobjects(RIGHT, buff = 0.2)
+ span_text.arrange(RIGHT, buff = 0.2)
arrow = DoubleArrow(LEFT, RIGHT)
column_space = TextMobject("``Column space''")
for mob in column_space, arrow:
mob.set_color(TEAL)
text = VMobject(span_text, arrow, column_space)
- text.arrange_submobjects(RIGHT)
+ text.arrange(RIGHT)
text.next_to(matrix, DOWN, buff = 1, aligned_edge = LEFT)
self.add(matrix)
@@ -1457,7 +1457,7 @@ class NameColumnSpace(Scene):
col.get_entries().set_color(c)
for index in 5, 6:
two_d_span[index].scale(0)
- two_d_span.arrange_submobjects(RIGHT, buff = 0.2)
+ two_d_span.arrange(RIGHT, buff = 0.2)
two_d_span[-1].next_to(two_d_span[4], RIGHT, buff = 0.2)
two_d_span.move_to(span_text, aligned_edge = RIGHT)
mob_matrix = np.array([
@@ -1624,7 +1624,7 @@ class FullRankCase(LinearTransformationScene):
TextMobject("Only"), vector,
TextMobject("lands on"), vector.copy()
)
- title.arrange_submobjects(buff = 0.2)
+ title.arrange(buff = 0.2)
title.to_edge(UP)
for mob in title:
mob.add_to_back(BackgroundRectangle(mob))
diff --git a/old_projects/eola/chapter7.py b/old_projects/eola/chapter7.py
index d1cb0377f..23aca2fea 100644
--- a/old_projects/eola/chapter7.py
+++ b/old_projects/eola/chapter7.py
@@ -64,7 +64,7 @@ class TraditionalOrdering(RandolphScene):
"(everything else)",
"\\vdots",
])))
- topics.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = SMALL_BUFF)
+ topics.arrange(DOWN, aligned_edge = LEFT, buff = SMALL_BUFF)
# topics.next_to(title, DOWN+RIGHT)
self.play(
@@ -104,7 +104,7 @@ class ThisSeriesOrdering(RandolphScene):
"Chapter 11: Abstract vector spaces",
]
])
- chapters.arrange_submobjects(
+ chapters.arrange(
DOWN, buff = SMALL_BUFF, aligned_edge = LEFT
)
chapters.set_height(1.5*FRAME_Y_RADIUS)
@@ -160,7 +160,7 @@ class ShowNumericalDotProduct(Scene):
v2 = Matrix(self.v2)
inter_array_dot = TexMobject("\\cdot").scale(1.5)
dot_product = VGroup(v1, inter_array_dot, v2)
- dot_product.arrange_submobjects(RIGHT, buff = MED_SMALL_BUFF/2)
+ dot_product.arrange(RIGHT, buff = MED_SMALL_BUFF/2)
dot_product.to_edge(LEFT)
pairs = list(zip(v1.get_entries(), v2.get_entries()))
@@ -171,10 +171,10 @@ class ShowNumericalDotProduct(Scene):
products = VGroup(*[
VGroup(
p1.copy(), dot.copy(), p2.copy()
- ).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ).arrange(RIGHT, buff = SMALL_BUFF)
for p1, p2 in pairs
])
- products.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ products.arrange(DOWN, buff = LARGE_BUFF)
products.next_to(dot_product, RIGHT, buff = LARGE_BUFF)
@@ -184,7 +184,7 @@ class ShowNumericalDotProduct(Scene):
final_sum = VGroup(*it.chain(*list(zip(
symbols, products.target
))))
- final_sum.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ final_sum.arrange(RIGHT, buff = SMALL_BUFF)
final_sum.next_to(dot_product, RIGHT)
title = TextMobject("Two vectors of the same dimension")
@@ -264,7 +264,7 @@ class GeometricInterpretation(VectorScene):
w.add_background_rectangle()
dot = TexMobject("\\cdot")
eq = VMobject(v, dot, w)
- eq.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ eq.arrange(RIGHT, buff = SMALL_BUFF)
eq.to_corner(UP+LEFT)
self.play(Write(eq), run_time = 1)
for array, char in zip([v, w], ["v", "w"]):
@@ -572,7 +572,7 @@ class SymmetricVAndW(VectorScene):
scalar = 2
new_v = v.copy().scale(scalar)
new_v.label = VMobject(TexMobject("2"), v.label.copy())
- new_v.label.arrange_submobjects(aligned_edge = DOWN)
+ new_v.label.arrange(aligned_edge = DOWN)
new_v.label.next_to(new_v.get_end(), DOWN+RIGHT)
new_v.proj = v.proj.copy().scale(scalar)
new_v.proj.fade()
@@ -717,7 +717,7 @@ class Symbolic2To1DTransform(Scene):
out_arrow = Arrow(LEFT, RIGHT, color = output_array.get_color())
VMobject(
input_array, in_arrow, func, out_arrow, output_array
- ).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ).arrange(RIGHT, buff = SMALL_BUFF)
input_brace = Brace(input_array, DOWN)
input_words = input_brace.get_text("2d input")
@@ -849,7 +849,7 @@ class FormalVsVisual(Scene):
visual_statement.set_submobject_colors_by_gradient(YELLOW, MAROON_B)
properties = VMobject(additivity, scaling)
- properties.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ properties.arrange(DOWN, buff = MED_SMALL_BUFF)
for text, mob in (formal, properties), (visual, visual_statement):
mob.scale(0.75)
@@ -1066,7 +1066,7 @@ class ShowMatrix(TwoDToOneDScene):
matrix = Matrix([[1, 2]])
matrix_words = TextMobject("Transformation matrix: ")
matrix_group = VMobject(matrix_words, matrix)
- matrix_group.arrange_submobjects()
+ matrix_group.arrange()
matrix_group.to_edge(UP)
entries = matrix.get_entries()
@@ -1246,14 +1246,14 @@ class TwoDOneDMatrixMultiplication(Scene):
pairs = [
VMobject(
e1.copy(), TexMobject("\\cdot"), e2.copy()
- ).arrange_submobjects(
+ ).arrange(
LEFT if self.order_left_to_right else RIGHT,
)
for e1, e2 in starter_pairs
]
symbols = list(map(TexMobject, ["=", "+"]))
equation = VMobject(*it.chain(*list(zip(symbols, pairs))))
- equation.arrange_submobjects(align_using_submobjects = True)
+ equation.arrange(align_using_submobjects = True)
equation.next_to(vector, RIGHT)
self.play(Write(VMobject(*symbols)))
@@ -1286,7 +1286,7 @@ class AssociationBetweenMatricesAndVectors(Scene):
arrow = DoubleArrow(LEFT, RIGHT, color = WHITE)
VGroup(
matrices_words, arrow, vectors_words
- ).arrange_submobjects(buff = MED_SMALL_BUFF)
+ ).arrange(buff = MED_SMALL_BUFF)
matrices = VGroup(*list(map(Matrix, self.matrices)))
vectors = VGroup(*list(map(Matrix, [m[0] for m in self.matrices])))
@@ -1606,7 +1606,7 @@ class AskAboutProjectionMatrix(Scene):
matrix = Matrix([["?", "?"]])
matrix.set_column_colors(X_COLOR, Y_COLOR)
words = TextMobject("Projection matrix:")
- VMobject(words, matrix).arrange_submobjects(buff = MED_SMALL_BUFF).shift(UP)
+ VMobject(words, matrix).arrange(buff = MED_SMALL_BUFF).shift(UP)
basis_words = [
TextMobject("Where", "$\\hat{\\%smath}$"%char, "lands")
for char in ("i", "j")
@@ -1658,7 +1658,7 @@ class ProjectBasisVectors(ProjectOntoUnitVectorNumberline):
question.set_color_by_tex(j_tex, Y_COLOR)
question.add_background_rectangle()
matrix = Matrix([["u_x", "u_y"]])
- VGroup(question, matrix).arrange_submobjects(DOWN).to_corner(
+ VGroup(question, matrix).arrange(DOWN).to_corner(
UP+LEFT, buff = MED_SMALL_BUFF/2
)
matrix_rect = BackgroundRectangle(matrix)
@@ -1819,7 +1819,7 @@ class GeneralTwoDOneDMatrixMultiplication(TwoDOneDMatrixMultiplication):
v = Matrix(self.vector)
self.color_matrix_and_vector(u, v)
dot_product = VGroup(u, TexMobject("\\cdot"), v)
- dot_product.arrange_submobjects()
+ dot_product.arrange()
dot_product.shift(2*RIGHT+DOWN)
words = VGroup(
TextMobject("Matrix-vector product"),
@@ -1828,7 +1828,7 @@ class GeneralTwoDOneDMatrixMultiplication(TwoDOneDMatrixMultiplication):
)
words[0].set_color(BLUE)
words[2].set_color(GREEN)
- words.arrange_submobjects(DOWN)
+ words.arrange(DOWN)
words.to_edge(LEFT)
@@ -2131,7 +2131,7 @@ class LooseDualityDescription(Scene):
arrow = TexMobject("\\Leftrightarrow")
words = TextMobject("Natural-but-surprising", "correspondence")
words[1].set_color_by_gradient(BLUE, YELLOW)
- VGroup(duality, arrow, words).arrange_submobjects(buff = MED_SMALL_BUFF)
+ VGroup(duality, arrow, words).arrange(buff = MED_SMALL_BUFF)
self.add(duality)
self.play(Write(arrow))
@@ -2167,7 +2167,7 @@ class TranslateToTheWorldOfTransformations(TwoDOneDMatrixMultiplication):
matrix.set_column_colors(X_COLOR, Y_COLOR)
dot_product = VGroup(v1, dot, v2)
- dot_product.arrange_submobjects(RIGHT)
+ dot_product.arrange(RIGHT)
matrix.next_to(v2, LEFT)
brace = Brace(matrix, UP)
diff --git a/old_projects/eola/chapter8.py b/old_projects/eola/chapter8.py
index c7f550172..09ac78dfe 100644
--- a/old_projects/eola/chapter8.py
+++ b/old_projects/eola/chapter8.py
@@ -70,7 +70,7 @@ class ListSteps(Scene):
step_2 = TextMobject("Next video: Deeper understanding with ", "linear transformations")
step_2.set_color_by_tex("linear transformations", BLUE)
steps = VGroup(step_1, step_2)
- steps.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = LARGE_BUFF)
+ steps.arrange(DOWN, aligned_edge = LEFT, buff = LARGE_BUFF)
steps.next_to(randy, UP)
steps.to_edge(LEFT, buff = LARGE_BUFF)
@@ -159,7 +159,7 @@ class SimpleDefine2dCrossProduct(LinearTransformationScene):
vect.label.target = vect.label.copy()
vect.label.target.save_state()
cross = VGroup(self.v.label.target, times, self.w.label.target)
- cross.arrange_submobjects(aligned_edge = DOWN)
+ cross.arrange(aligned_edge = DOWN)
cross.scale(1.5)
cross.shift(2.5*UP).to_edge(LEFT)
cross_rect = BackgroundRectangle(cross)
@@ -266,7 +266,7 @@ class SimpleDefine2dCrossProduct(LinearTransformationScene):
def swap_v_and_w(self):
new_cross = self.cross.copy()
- new_cross.arrange_submobjects(LEFT, aligned_edge = DOWN)
+ new_cross.arrange(LEFT, aligned_edge = DOWN)
new_cross.move_to(self.area_words, aligned_edge = LEFT)
for vect in self.v, self.w:
vect.remove(vect.label)
@@ -328,7 +328,7 @@ class CrossBasisVectors(LinearTransformationScene):
times = TexMobject("\\times")
cross = VGroup(i_label.target, times, j_label.target)
- cross.arrange_submobjects()
+ cross.arrange()
cross.next_to(ORIGIN).shift(1.5*UP)
cross_rect = BackgroundRectangle(cross)
eq = TexMobject("= + 1")
@@ -460,15 +460,15 @@ class ContrastDotAndCross(Scene):
[
VGroup(
e1.target, get_dot(), e2.target
- ).arrange_submobjects()
+ ).arrange()
for e1, e2 in zip(m1.get_entries(), m2.get_entries())
]
))))
- result.arrange_submobjects(RIGHT)
+ result.arrange(RIGHT)
dot_prod = VGroup(
m1, TexMobject("\\cdot"), m2, result
)
- dot_prod.arrange_submobjects(RIGHT)
+ dot_prod.arrange(RIGHT)
if dot_prod.get_width() > max_width:
dot_prod.set_width(max_width)
dot_prod.next_to(last_mob, DOWN, buff = MED_SMALL_BUFF)
@@ -506,7 +506,7 @@ class ContrastDotAndCross(Scene):
entry.set_color(color)
m1, m2 = matrices
cross_product = VGroup(m1, TexMobject("\\times"), m2)
- cross_product.arrange_submobjects()
+ cross_product.arrange()
index_to_cross_enty = {}
syms = VGroup()
@@ -519,7 +519,7 @@ class ContrastDotAndCross(Scene):
dot = TexMobject("\\cdot")
syms.add(dot)
cross_entry = VGroup(e1.target, dot, e2.target)
- cross_entry.arrange_submobjects()
+ cross_entry.arrange()
if a not in index_to_cross_enty:
index_to_cross_enty[a] = []
index_to_cross_enty[a].append(cross_entry)
@@ -528,18 +528,18 @@ class ContrastDotAndCross(Scene):
prod1, prod2 = index_to_cross_enty[a]
if a == 1:
prod1, prod2 = prod2, prod1
- prod2.arrange_submobjects(LEFT)
+ prod2.arrange(LEFT)
minus = TexMobject("-")
syms.add(minus)
entry = VGroup(prod1, minus, prod2)
- entry.arrange_submobjects(RIGHT)
+ entry.arrange(RIGHT)
result_entries.append(entry)
result = Matrix(result_entries)
full_cross_product = VGroup(
cross_product, TexMobject("="), result
)
- full_cross_product.arrange_submobjects()
+ full_cross_product.arrange()
full_cross_product.scale(0.75)
full_cross_product.next_to(self.r_h_line, DOWN, buff = MED_SMALL_BUFF/2)
full_cross_product.remove(result)
@@ -581,7 +581,7 @@ class ContrastDotAndCross(Scene):
for e, color in zip(m.get_entries(), [X_COLOR, Y_COLOR]):
e.set_color(color)
cross_product = VGroup(m1, TexMobject("\\times"), m2)
- cross_product.arrange_submobjects()
+ cross_product.arrange()
(x1, x2), (x3, x4) = tuple(m1.get_entries()), tuple(m2.get_entries())
entries = [x1, x2, x3, x4]
for entry in entries:
@@ -593,9 +593,9 @@ class ContrastDotAndCross(Scene):
eq, x1.target, dot1, x4.target,
minus, x3.target, dot2, x2.target,
)
- result.arrange_submobjects(RIGHT)
+ result.arrange(RIGHT)
full_cross_product = VGroup(cross_product, result)
- full_cross_product.arrange_submobjects(RIGHT)
+ full_cross_product.arrange(RIGHT)
full_cross_product.next_to(h_line, DOWN, buff = MED_SMALL_BUFF/2)
self.play(ShowCreation(h_line))
@@ -685,7 +685,7 @@ class Define2dCrossProduct(LinearTransformationScene):
v.label.target, times, w.label.target
)
- cross_product.arrange_submobjects()
+ cross_product.arrange()
matrix = Matrix(np.array([
list(v.coords.target),
list(w.coords.target)
@@ -694,7 +694,7 @@ class Define2dCrossProduct(LinearTransformationScene):
full_det = VGroup(det_text, matrix)
equals = TexMobject("=")
equation = VGroup(cross_product, equals, full_det)
- equation.arrange_submobjects()
+ equation.arrange()
equation.to_corner(UP+LEFT)
matrix_background = BackgroundRectangle(matrix)
@@ -879,7 +879,7 @@ class Define2dCrossProduct(LinearTransformationScene):
pm = VGroup(*list(map(TexMobject, ["+", "-"])))
pm.set_color_by_gradient(GREEN, RED)
- pm.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ pm.arrange(DOWN, buff = SMALL_BUFF)
pm.add_to_back(BackgroundRectangle(pm))
pm.next_to(area_words[0], LEFT, aligned_edge = DOWN)
self.play(
@@ -1026,7 +1026,7 @@ class TwoDCrossProductExample(Define2dCrossProduct):
cross_product,
VGroup(matrix_background, det_text, matrix)
)
- equation_start.arrange_submobjects()
+ equation_start.arrange()
equation_start.next_to(ORIGIN, DOWN).to_edge(LEFT)
@@ -1063,7 +1063,7 @@ class TwoDCrossProductExample(Define2dCrossProduct):
equals, v1.target, dot1, w2.target,
minus, w1.target, dot2, v2.target, equals_result
)
- equation_end.arrange_submobjects()
+ equation_end.arrange()
equation_end.next_to(equation_start)
syms_rect = BackgroundRectangle(syms)
syms.add_to_back(syms_rect)
@@ -1146,7 +1146,7 @@ class BiggerWhenPerpendicular(LinearTransformationScene):
bigger.set_color(PINK)
smaller.set_color(TEAL)
group = VGroup(start_words, arrow, cross_is, bigger)
- group.arrange_submobjects()
+ group.arrange()
group.to_edge(UP)
end_words.move_to(start_words, aligned_edge = RIGHT)
smaller.next_to(cross_is, buff = MED_SMALL_BUFF/2, aligned_edge = DOWN)
@@ -1227,7 +1227,7 @@ class ScalingRule(LinearTransformationScene):
tex_mob.set_color_by_tex(v_tex, V_COLOR)
tex_mob.set_color_by_tex(w_tex, W_COLOR)
equation = VGroup(cross_product, rhs)
- equation.arrange_submobjects()
+ equation.arrange()
equation.to_edge(UP)
v_tex_mob = cross_product[0]
three_v.move_to(v_tex_mob, aligned_edge = RIGHT)
@@ -1390,7 +1390,7 @@ class ShowCrossProductFormula(Scene):
entry.set_color(color)
m1, m2 = matrices
cross_product = VGroup(m1, TexMobject("\\times"), m2)
- cross_product.arrange_submobjects()
+ cross_product.arrange()
cross_product.shift(2*LEFT)
entry_dicts = [{} for x in range(3)]
@@ -1407,13 +1407,13 @@ class ShowCrossProductFormula(Scene):
minus = TexMobject("-")
syms.add(minus)
cross_entry = VGroup(minus, e2.target, dot, e1.target)
- cross_entry.arrange_submobjects()
+ cross_entry.arrange()
entry_dicts[a]["negative"] = cross_entry
else:
cross_entry = VGroup(e1.target, dot, e2.target)
- cross_entry.arrange_submobjects()
+ cross_entry.arrange()
entry_dicts[a]["positive"] = cross_entry
- cross_entry.arrange_submobjects()
+ cross_entry.arrange()
movement_sets.append([
e1, e1.target,
e2, e2.target,
@@ -1424,7 +1424,7 @@ class ShowCrossProductFormula(Scene):
VGroup(
entry_dict["positive"],
entry_dict["negative"],
- ).arrange_submobjects()
+ ).arrange()
for entry_dict in entry_dicts
])
equals = TexMobject("=").next_to(cross_product)
@@ -1500,7 +1500,7 @@ class DeterminantTrick(Scene):
v, TexMobject("\\times"), w,
equals, VGroup(det_text, matrix)
)
- equation.arrange_submobjects()
+ equation.arrange()
self.add(*equation[:-2])
self.wait()
@@ -1569,7 +1569,7 @@ class DeterminantTrick(Scene):
quint[1].t, quint[2].t, minus,
quint[3].t, quint[4].t, rp
)
- term.arrange_submobjects()
+ term.arrange()
if last_mob:
plus = TexMobject("+")
syms.add(plus)
@@ -1676,10 +1676,10 @@ class CrossAndDualWords(Scene):
dot_with_cross.set_color_by_tex(v_tex, U_COLOR)
dot_with_cross.set_color_by_tex(w_tex, W_COLOR)
transform = VGroup(func, det_text)
- transform.arrange_submobjects()
+ transform.arrange()
VGroup(transform, dot_with_cross).scale(0.7)
- VGroup(vector_word, cross).arrange_submobjects(
+ VGroup(vector_word, cross).arrange(
RIGHT, buff = MED_SMALL_BUFF
).center().shift(LEFT).to_edge(UP)
transform_word.next_to(vector_word, DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
diff --git a/old_projects/eola/chapter8p2.py b/old_projects/eola/chapter8p2.py
index 9f3074c9c..84aae96d9 100644
--- a/old_projects/eola/chapter8p2.py
+++ b/old_projects/eola/chapter8p2.py
@@ -62,7 +62,7 @@ class BruteForceVerification(Scene):
TexMobject("-"),
e3.copy(), e4.copy(),
)
- group.arrange_submobjects()
+ group.arrange()
return group
cross = Matrix(list(it.starmap(get_term, [
(v2, w3, v3, w2),
@@ -73,7 +73,7 @@ class BruteForceVerification(Scene):
v.copy(), TexMobject("\\times"), w.copy(),
TexMobject("="), cross.copy()
)
- cross_product.arrange_submobjects()
+ cross_product.arrange()
cross_product.scale(0.75)
formula_word = TextMobject("Numerical formula")
@@ -205,7 +205,7 @@ class DotProductToTransformSymbol(Scene):
vector, dot, left_input, equals,
matrix, right_input
)
- equation.arrange_submobjects()
+ equation.arrange()
left_brace = Brace(VGroup(vector, left_input))
right_brace = Brace(matrix, UP)
left_words = left_brace.get_text("Dot product")
@@ -312,7 +312,7 @@ class ThreeStepPlan(Scene):
steps[0].set_color_by_tex(w_text, W_COLOR)
steps[1][1].set_color_by_gradient(BLUE, YELLOW)
steps[2].set_color_by_tex(cross_text, P_COLOR)
- VGroup(*steps).arrange_submobjects(
+ VGroup(*steps).arrange(
DOWN, aligned_edge = LEFT, buff = LARGE_BUFF
).next_to(h_line, DOWN, buff = MED_SMALL_BUFF)
@@ -395,10 +395,10 @@ class DefineDualTransform(Scene):
tex_mob.set_color(color)
equals = TexMobject("=")
definition = VGroup(tex_mob, equals, array)
- definition.arrange_submobjects(RIGHT)
+ definition.arrange(RIGHT)
definitions.add(definition)
defs_equals.add(equals)
- definitions.arrange_submobjects(buff = MED_SMALL_BUFF)
+ definitions.arrange(buff = MED_SMALL_BUFF)
definitions.shift(2*DOWN)
mobs_with_targets = list(it.chain(
@@ -418,10 +418,10 @@ class DefineDualTransform(Scene):
triple_cross = VGroup(
u_tex.target, times1, v_tex.target, times2, w_tex.target, equals
)
- triple_cross.arrange_submobjects()
+ triple_cross.arrange()
final_mobs = VGroup(triple_cross, VGroup(det_text, matrix))
- final_mobs.arrange_submobjects()
+ final_mobs.arrange()
final_mobs.next_to(self.title, DOWN, buff = MED_SMALL_BUFF)
for mob in definitions, final_mobs:
@@ -652,9 +652,9 @@ class DefineDualTransform(Scene):
p.target = p.copy().scale(2)
x.target = x.copy().scale(2)
component = VGroup(p.target, p.sym, x.target, x.sym)
- component.arrange_submobjects()
+ component.arrange()
dot_components.add(component)
- dot_components.arrange_submobjects()
+ dot_components.arrange()
dot_components.next_to(ORIGIN, LEFT)
dot_components.shift(1.5*DOWN)
dot_arrow = Arrow(self.p_array.get_corner(DOWN+RIGHT), dot_components)
@@ -697,10 +697,10 @@ class DefineDualTransform(Scene):
mob.sym = sym
quint_targets = [mob.target for mob in quint]
component = VGroup(*it.chain(*list(zip(quint_targets, syms))))
- component.arrange_submobjects()
+ component.arrange()
cross_components.add(component)
to_fade.add(syms[0], syms[-1], quint[0])
- cross_components.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
+ cross_components.arrange(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
cross_components.next_to(dot_components, RIGHT)
for quint in quints:
self.play(*[
@@ -718,7 +718,7 @@ class DefineDualTransform(Scene):
self.wait()
self.play(
ApplyFunction(
- lambda m : m.arrange_submobjects(
+ lambda m : m.arrange(
DOWN, buff = MED_SMALL_BUFF+SMALL_BUFF
).next_to(cross_components, LEFT),
new_ps
@@ -809,7 +809,7 @@ class DotProductWords(Scene):
p_mob.set_color(P_COLOR)
input_array = Matrix(list("xyz"))
dot_product = VGroup(p_mob, Dot(radius = 0.07), input_array)
- dot_product.arrange_submobjects(buff = MED_SMALL_BUFF/2)
+ dot_product.arrange(buff = MED_SMALL_BUFF/2)
equals = TexMobject("=")
dot_product.next_to(equals, LEFT)
words = VGroup(*it.starmap(TextMobject, [
@@ -854,7 +854,7 @@ class GeometricVolumeWords(Scene):
words[0].set_color_by_tex("parallelogram", BLUE)
words[1].set_color_by_tex(v_tex, ORANGE)
words[1].set_color_by_tex(w_tex, W_COLOR)
- words.arrange_submobjects(RIGHT)
+ words.arrange(RIGHT)
words.set_width(FRAME_WIDTH - 1)
words.to_edge(DOWN, buff = SMALL_BUFF)
for word in words:
diff --git a/old_projects/eola/chapter9.py b/old_projects/eola/chapter9.py
index d05551426..3a762aad4 100644
--- a/old_projects/eola/chapter9.py
+++ b/old_projects/eola/chapter9.py
@@ -101,7 +101,7 @@ class LinearCombinationScene(LinearTransformationScene):
basis.label.target = basis.label.copy()
coord.target = coord.copy()
new_label = VGroup(coord.target, basis.label.target)
- new_label.arrange_submobjects(aligned_edge = DOWN)
+ new_label.arrange(aligned_edge = DOWN)
new_label.move_to(
basis.label,
aligned_edge = basis.get_center()-basis.label.get_center()
@@ -221,16 +221,16 @@ class RemindOfCoordinates(LinearCombinationScene):
ass1 = TextMobject("-First coordinate")
ass1 = VGroup(ass1, self.i_hat.copy())
- ass1.arrange_submobjects(buff = MED_SMALL_BUFF)
+ ass1.arrange(buff = MED_SMALL_BUFF)
ass2 = TextMobject("-Second coordinate")
ass2 = VGroup(ass2, self.j_hat.copy())
- ass2.arrange_submobjects(buff = MED_SMALL_BUFF)
+ ass2.arrange(buff = MED_SMALL_BUFF)
ass3 = TextMobject("-Unit of distance")
group = VGroup(title, ass1, ass2, ass3)
- group.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
+ group.arrange(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
group.to_corner(UP+LEFT)
# VGroup(*group[1:]).shift(0.5*DOWN)
for words in group:
@@ -490,7 +490,7 @@ class IntroduceJennifer(JenniferScene):
basis.label.target = basis.label.copy()
coord.target = coord.copy()
new_label = VGroup(coord.target, basis.label.target)
- new_label.arrange_submobjects(aligned_edge = DOWN)
+ new_label.arrange(aligned_edge = DOWN)
new_label.move_to(
basis.label,
aligned_edge = basis.get_center()-basis.label.get_center()
@@ -886,7 +886,7 @@ class TranslateFromJenny(JenniferScene):
for mover in movers:
mover.target = mover.copy()
mover_targets = VGroup(*[mover.target for mover in movers])
- mover_targets.arrange_submobjects()
+ mover_targets.arrange()
mover_targets.to_edge(UP)
for mob in syms + [result]:
mob.move_to(mob.target)
@@ -976,7 +976,7 @@ class TalkThroughChangeOfBasisMatrix(JenniferScene):
TexMobject(","),
Matrix([0, 1]).set_color(Y_COLOR).scale(0.7),
)
- basis_coords_pair.arrange_submobjects(aligned_edge = DOWN)
+ basis_coords_pair.arrange(aligned_edge = DOWN)
self.you.bubble.add_content(basis_coords_pair)
t_matrix1 = np.array([self.b1_coords, [0, 1]])
@@ -1083,7 +1083,7 @@ class ChangeOfBasisExample(JenniferScene):
start_words = TextMobject("How", "we", "think of")
start_words.add_background_rectangle()
start_group = VGroup(start_words, v_coords)
- start_group.arrange_submobjects(buff = MED_SMALL_BUFF)
+ start_group.arrange(buff = MED_SMALL_BUFF)
start_group.next_to(self.you, LEFT, buff = 0)
start_group.to_edge(UP)
end_words = TextMobject("How", "Jennifer", "thinks of")
@@ -1266,7 +1266,7 @@ class WorkOutInverseComputation(Scene):
for mob in equation:
if isinstance(mob, Matrix):
mob.set_height(2)
- equation.arrange_submobjects()
+ equation.arrange()
matrix_brace = Brace(matrix, UP)
our_vector_brace = Brace(our_vector)
@@ -1329,7 +1329,7 @@ class SummarizeTranslationProcess(Scene):
matrix.set_column_colors(X_COLOR, Y_COLOR)
A, equals = list(map(TexMobject, list("A=")))
equation = VGroup(A, equals, matrix)
- equation.arrange_submobjects()
+ equation.arrange()
equation.to_corner(UP+LEFT)
equation.shift(RIGHT)
words = TextMobject("""
@@ -1359,7 +1359,7 @@ class SummarizeTranslationProcess(Scene):
equals = TexMobject("=")
equation = VGroup(A, her_vector, equals, our_vector)
- equation.arrange_submobjects()
+ equation.arrange()
equation.to_edge(RIGHT)
equation.shift(0.5*UP)
A_inv.next_to(our_vector, LEFT)
@@ -1609,7 +1609,7 @@ class HowToTranslateAMatrix(Scene):
neg_1 = TexMobject("-1")
neg_1.next_to(inv_cob.get_corner(UP+RIGHT), RIGHT)
inv_cob.add(neg_1)
- arrays.arrange_submobjects(LEFT)
+ arrays.arrange(LEFT)
arrays.to_edge(LEFT, buff = LARGE_BUFF/2.)
for array in arrays:
array.brace = Brace(array)
diff --git a/old_projects/eola/footnote.py b/old_projects/eola/footnote.py
index 98eec2c29..148c4ee47 100644
--- a/old_projects/eola/footnote.py
+++ b/old_projects/eola/footnote.py
@@ -125,7 +125,7 @@ class PutTogether3x3Matrix(Scene):
j_to, j_array, TexMobject("=").set_color(BLACK),
k_to, k_array, TexMobject("=").set_color(BLACK),
)
- everything.arrange_submobjects(RIGHT, buff = 0.1)
+ everything.arrange(RIGHT, buff = 0.1)
everything.set_width(FRAME_WIDTH-1)
everything.to_edge(DOWN)
@@ -193,7 +193,7 @@ class ShowVCoordinateMeaning(Scene):
parens.stretch_to_fit_height(
coords.get_height()
)
- VMobject(L, l_paren, coords, r_paren).arrange_submobjects(buff = 0.1)
+ VMobject(L, l_paren, coords, r_paren).arrange(buff = 0.1)
coords.submobjects = [L, l_paren] + coords.submobjects + [r_paren]
lin_comb = VMobject(*list(map(TexMobject, [
@@ -201,7 +201,7 @@ class ShowVCoordinateMeaning(Scene):
"y", self.j_str, "+",
"z", self.k_str,
])))
- lin_comb.arrange_submobjects(
+ lin_comb.arrange(
RIGHT, buff = 0.1,
aligned_edge = ORIGIN if self.post_transform else DOWN
)
@@ -214,7 +214,7 @@ class ShowVCoordinateMeaning(Scene):
k.set_color(Z_COLOR)
everything = VMobject(v, eq, coords, eq2, lin_comb)
- everything.arrange_submobjects(buff = 0.2)
+ everything.arrange(buff = 0.2)
everything.set_width(FRAME_WIDTH - 1)
everything.to_edge(DOWN)
if not self.post_transform:
@@ -263,7 +263,7 @@ class ShowMatrixVectorMultiplication(Scene):
y, col2, plus2,
z, col3
)
- everything.arrange_submobjects(buff = 0.1)
+ everything.arrange(buff = 0.1)
everything.set_width(FRAME_WIDTH-1)
result = VMobject(x, col1, plus1, y, col2, plus2, z, col3)
@@ -321,7 +321,7 @@ class ShowMatrixMultiplication(Scene):
def construct(self):
right = Matrix(np.arange(9).reshape((3, 3)))
left = Matrix(np.random.random_integers(-5, 5, (3, 3)))
- VMobject(left, right).arrange_submobjects(buff = 0.1)
+ VMobject(left, right).arrange(buff = 0.1)
right.set_column_colors(X_COLOR, Y_COLOR, Z_COLOR)
left.set_color(PINK)
@@ -354,7 +354,7 @@ class ComputerGraphicsAndRobotics(Scene):
TextMobject("Computer graphics"),
TextMobject("Robotics")
)
- mob.arrange_submobjects(DOWN, buff = 1)
+ mob.arrange(DOWN, buff = 1)
self.play(Write(mob, run_time = 1))
self.wait()
@@ -389,7 +389,7 @@ class QuestionsToPonder(Scene):
"3. How many rows and columns?",
"4. When can you multiply these matrices?",
])))
- questions.arrange_submobjects(DOWN, buff = 1, aligned_edge = LEFT)
+ questions.arrange(DOWN, buff = 1, aligned_edge = LEFT)
questions.to_edge(LEFT)
for question in questions.split():
self.play(Write(question, run_time = 1))
diff --git a/old_projects/eola/footnote2.py b/old_projects/eola/footnote2.py
index 27395f564..ae49dcc5b 100644
--- a/old_projects/eola/footnote2.py
+++ b/old_projects/eola/footnote2.py
@@ -101,7 +101,7 @@ class Symbolic2To3DTransform(Scene):
out_arrow = Arrow(LEFT, RIGHT, color = output_array.get_color())
VMobject(
input_array, in_arrow, func, out_arrow, output_array
- ).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ).arrange(RIGHT, buff = SMALL_BUFF)
input_brace = Brace(input_array, DOWN)
input_words = input_brace.get_text("2d input")
@@ -237,7 +237,7 @@ class WriteColumnSpaceDefinition(Scene):
TexMobject("\\Updownarrow"),
TextMobject("``Column space''")
)
- words.arrange_submobjects(DOWN, buff = 0.1)
+ words.arrange(DOWN, buff = 0.1)
words.next_to(brace, DOWN)
words[0][0].set_color(PINK)
words[2].set_color(TEAL)
@@ -382,7 +382,7 @@ class Symbolic2To1DTransform(Scene):
out_arrow = Arrow(LEFT, RIGHT, color = output_array.get_color())
VMobject(
input_array, in_arrow, func, out_arrow, output_array
- ).arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ ).arrange(RIGHT, buff = SMALL_BUFF)
input_brace = Brace(input_array, DOWN)
input_words = input_brace.get_text("2d input")
@@ -463,7 +463,7 @@ class TwoDTo1DTransform(LinearTransformationScene):
matrix = Matrix([[1, 2]])
matrix_words = TextMobject("Transformation matrix: ")
matrix_group = VMobject(matrix_words, matrix)
- matrix_group.arrange_submobjects(buff = MED_SMALL_BUFF)
+ matrix_group.arrange(buff = MED_SMALL_BUFF)
matrix_group.to_edge(UP)
entries = matrix.get_entries()
@@ -547,7 +547,7 @@ class DotProductPreview(VectorScene):
w.add_background_rectangle()
dot = TexMobject("\\cdot")
eq = VMobject(v, dot, w)
- eq.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ eq.arrange(RIGHT, buff = SMALL_BUFF)
eq.to_corner(UP+LEFT)
self.play(Write(eq), run_time = 1)
diff --git a/old_projects/eola/thumbnails.py b/old_projects/eola/thumbnails.py
index 965125190..6df598248 100644
--- a/old_projects/eola/thumbnails.py
+++ b/old_projects/eola/thumbnails.py
@@ -20,7 +20,7 @@ class Chapter1(Scene):
array = Matrix([1, 2])
array.set_color(TEAL)
everyone = VMobject(arrow, vs, array)
- everyone.arrange_submobjects(RIGHT, buff = 0.5)
+ everyone.arrange(RIGHT, buff = 0.5)
everyone.set_height(4)
self.add(everyone)
diff --git a/old_projects/fc1.py b/old_projects/fc1.py
index 43f8ac131..5b0988d38 100644
--- a/old_projects/fc1.py
+++ b/old_projects/fc1.py
@@ -135,7 +135,7 @@ class AllFeaturedCreators(MortyPiCreatureScene):
title = Title("Featured creators")
dots = VGroup(*[Dot(color=WHITE) for x in range(4)])
- dots.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ dots.arrange(DOWN, buff=LARGE_BUFF)
dots.to_edge(LEFT, buff=2)
creators = VGroup(*list(map(TextMobject, [
diff --git a/old_projects/fourier.py b/old_projects/fourier.py
index a939e9797..6aff695bd 100644
--- a/old_projects/fourier.py
+++ b/old_projects/fourier.py
@@ -114,7 +114,7 @@ class OtherContexts(PiCreatureScene):
"Riemann Zeta function and primes",
"Differential equations",
])))
- items.arrange_submobjects(
+ items.arrange(
DOWN, buff = MED_LARGE_BUFF,
aligned_edge = LEFT
)
@@ -613,7 +613,7 @@ class BreakApartSum(Scene):
for freq in self.frequencies
])
pure_graphs.set_color_by_gradient(BLUE, RED)
- pure_graphs.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ pure_graphs.arrange(DOWN, buff = MED_LARGE_BUFF)
h_line = DashedLine(6*LEFT, 6*RIGHT)
self.play(
@@ -739,7 +739,7 @@ class MachineThatTreatsOneFrequencyDifferently(Scene):
Vector(DOWN), TextMobject("???").scale(1.5), Vector(DOWN)
)
group.set_color(WHITE)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.next_to(graph, DOWN)
self.add(group)
@@ -1276,7 +1276,7 @@ class WrapCosineGraphAroundCircle(FourierMachineScene):
DecimalNumber(freq, num_decimal_places=2),
TextMobject("cycles/second")
)
- winding_freq_label.arrange_submobjects(RIGHT)
+ winding_freq_label.arrange(RIGHT)
winding_freq_label.next_to(
self.circle_plane, RIGHT, aligned_edge = UP
)
@@ -2030,7 +2030,7 @@ class ShowCommutativeDiagram(ShowLinearity):
ta_group = VGroup(
time_axes, time_axes.deepcopy(), time_axes.deepcopy(),
)
- ta_group.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ ta_group.arrange(DOWN, buff = MED_LARGE_BUFF)
ta_group.to_corner(UP+LEFT, buff = MED_SMALL_BUFF)
frequency_axes = Axes(**self.frequency_axes_config)
@@ -3978,7 +3978,7 @@ class ShowUncertaintyPrinciple(Scene):
group = VGroup(
title, top_axes, arrow, bottom_axes
)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
title.shift(MED_SMALL_BUFF*UP)
group.to_edge(UP)
fourier_word = TextMobject("Fourier transform")
@@ -4117,7 +4117,7 @@ class PuzzleDescription(Scene):
VGroup(lines[2][1][4], lines[2][1][8]).set_color(MAROON_B)
lines[2][1][10].set_color(BLUE_C)
lines.scale(1.25)
- lines.arrange_submobjects(DOWN, buff = LARGE_BUFF, aligned_edge = LEFT)
+ lines.arrange(DOWN, buff = LARGE_BUFF, aligned_edge = LEFT)
lines.to_corner(UP+RIGHT)
@@ -4262,7 +4262,7 @@ class Thumbnail(Scene):
pol_graph.match_color(graph)
pol_graph.set_height(2)
pol_graphs.add(pol_graph)
- pol_graphs.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ pol_graphs.arrange(RIGHT, buff = LARGE_BUFF)
pol_graphs.set_color_by_gradient(BLUE_C, YELLOW)
pol_graphs.match_width(graph)
pol_graphs.set_stroke(width = 2)
diff --git a/old_projects/fractal_dimension.py b/old_projects/fractal_dimension.py
index a4c2659e1..f9b70efdc 100644
--- a/old_projects/fractal_dimension.py
+++ b/old_projects/fractal_dimension.py
@@ -277,7 +277,7 @@ class SelfSimilarFractalsAsSubset(Scene):
)
for submob in fractals:
submob.set_width(self.fractal_width)
- fractals.arrange_submobjects(RIGHT)
+ fractals.arrange(RIGHT)
fractals[-1].next_to(VGroup(*fractals[:-1]), DOWN)
title = TextMobject("Self-similar fractals")
@@ -738,7 +738,7 @@ class GeneralWordForMeasurement(Scene):
words = VGroup(*list(map(TextMobject, [
"Length", "Area", "Volume"
])))
- words.arrange_submobjects(RIGHT, buff = 2*LARGE_BUFF)
+ words.arrange(RIGHT, buff = 2*LARGE_BUFF)
words.next_to(measure, DOWN, buff = 2*LARGE_BUFF)
colors = color_gradient([BLUE_B, BLUE_D], len(words))
for word, color in zip(words, colors):
@@ -987,7 +987,7 @@ class DefineTwoDimensional(PiCreatureScene):
top_group = VGroup(top_length, top_mass)
bottom_group = VGroup(bottom_length, bottom_mass)
for group in top_group, bottom_group:
- group.arrange_submobjects(
+ group.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -1120,7 +1120,7 @@ class DefineSierpinskiDimension(DefineTwoDimensional):
equation = self.distilled_equation
self.play(
- equation.arrange_submobjects, RIGHT,
+ equation.arrange, RIGHT,
equation.scale, self.equation_scale_factor,
equation.to_corner, UP+RIGHT,
run_time = 2
@@ -1602,7 +1602,7 @@ class ShowDiskScaling(Scene):
shape.set_stroke(width = 0)
shape.set_fill(opacity = 1)
shapes.set_color_by_gradient(BLUE_B, BLUE_E)
- shapes.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ shapes.arrange(RIGHT, buff = LARGE_BUFF)
shapes.next_to(title, DOWN)
for shape in shapes:
self.play(FadeIn(shape))
@@ -2099,7 +2099,7 @@ class BoxCountingWithBritain(BoxCountingScene):
simpler_eq = VGroup(N, approx, c, s, dim)
simpler_eq.generate_target()
- simpler_eq.target.arrange_submobjects(buff = SMALL_BUFF)
+ simpler_eq.target.arrange(buff = SMALL_BUFF)
simpler_eq.target.move_to(N, LEFT)
simpler_eq.target[-1].next_to(
simpler_eq.target[-2].get_corner(UP+RIGHT),
@@ -2464,7 +2464,7 @@ class ListDimensionTypes(PiCreatureScene):
"Hausdorff dimension",
"Packing dimension"
])))
- types.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ types.arrange(DOWN, aligned_edge = LEFT)
for text in types:
self.play(
Write(text, run_time = 1),
diff --git a/old_projects/gradient.py b/old_projects/gradient.py
index f03f77e91..819a61121 100644
--- a/old_projects/gradient.py
+++ b/old_projects/gradient.py
@@ -120,7 +120,7 @@ class ShowGradient(Scene):
["\\partial f / \\partial y"],
], v_buff=1)
gradient = VGroup(lhs, vector)
- gradient.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ gradient.arrange(RIGHT, buff=SMALL_BUFF)
gradient.scale(1.5)
del_x, del_y = partials = vector.get_entries()
@@ -342,7 +342,7 @@ class ShowDerivativeAtExamplePoint(Scene):
TexMobject("="),
result_vector
)
- gradient.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ gradient.arrange(RIGHT, buff=SMALL_BUFF)
func_tex.to_edge(UP)
gradient.next_to(func_tex, DOWN, buff=LARGE_BUFF)
@@ -359,7 +359,7 @@ class ShowDerivativeAtExamplePoint(Scene):
TexMobject("="),
example_rhs,
)
- example.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ example.arrange(RIGHT, buff=SMALL_BUFF)
example.next_to(gradient, DOWN, LARGE_BUFF)
self.add(func_tex, gradient)
diff --git a/old_projects/hanoi.py b/old_projects/hanoi.py
index df5e7a75d..ebab8e59f 100644
--- a/old_projects/hanoi.py
+++ b/old_projects/hanoi.py
@@ -311,7 +311,7 @@ class TowersOfHanoiScene(Scene):
def reset_disks(self, **kwargs):
self.disks.generate_target()
- self.disks.target.arrange_submobjects(DOWN, buff = 0)
+ self.disks.target.arrange(DOWN, buff = 0)
self.disks.target.move_to(self.pegs[0], DOWN)
self.play(
MoveToTarget(self.disks),
@@ -652,7 +652,7 @@ class IntroduceTowersOfHanoi(TowersOfHanoiScene):
group.rotate_in_place(-11*np.pi/24, RIGHT)
disk.set_fill(opacity = 0)
disk_groups.add(group)
- disk_groups.arrange_submobjects()
+ disk_groups.arrange()
disk_groups.next_to(self.peg_labels, DOWN)
self.play(FadeIn(
@@ -1457,7 +1457,7 @@ class RecursiveSolution(TowersOfHanoiScene):
title, sub_step_brace, sub_steps,
sub_sub_steps_brace, sub_sub_steps
)
- steps.arrange_submobjects(DOWN)
+ steps.arrange(DOWN)
steps.scale(0.7)
steps.to_edge(UP)
VGroup(sub_sub_steps_brace, sub_sub_steps).next_to(sub_steps[-1], DOWN)
@@ -2046,7 +2046,7 @@ class RecursiveSolutionToConstrained(RecursiveSolution):
steps = VGroup(title, *it.chain(*list(zip(
braces, subdivisions
))))
- steps.arrange_submobjects(DOWN)
+ steps.arrange(DOWN)
steps.to_edge(UP)
steps_to_fade = VGroup(
@@ -2412,7 +2412,7 @@ class TernaryCountingSelfSimilarPattern(Scene):
"Roll over,",
"Count to %s,"%("2"*(self.num_trits-1)),
])))
- steps.arrange_submobjects(RIGHT)
+ steps.arrange(RIGHT)
for step in steps[::2]:
for i, color in enumerate(colors[:-1]):
step[-i-2].set_color(color)
@@ -2420,7 +2420,7 @@ class TernaryCountingSelfSimilarPattern(Scene):
steps.set_width(FRAME_WIDTH-1)
brace = Brace(steps, UP)
word_group = VGroup(title, brace, steps)
- word_group.arrange_submobjects(DOWN)
+ word_group.arrange(DOWN)
word_group.to_edge(UP)
ternary_mobs = VGroup(*[
@@ -2693,7 +2693,7 @@ class AnswerConfigurationsCount(TowersOfHanoiScene):
"""%d)
for d in range(self.num_disks)
]))
- parentheticals.arrange_submobjects()
+ parentheticals.arrange()
parentheticals.set_width(FRAME_WIDTH-1)
parentheticals.next_to(top_mob, DOWN)
for parens in parentheticals:
@@ -2744,7 +2744,7 @@ class RepeatingConfiguraiton(Scene):
arrows.add(VGroup())
arrows.scale(0.5)
group = VGroup(*it.chain(*list(zip(dots, arrows))))
- group.arrange_submobjects()
+ group.arrange()
title = TextMobject("Same state twice")
title.shift(3*UP)
special_dots = VGroup(dots[2], dots[6])
@@ -3212,7 +3212,7 @@ class PatreonThanks(Scene):
self.specific_patrons[n_patrons/2:]
)))
for patrons, vect in (left_patrons, LEFT), (right_patrons, RIGHT):
- patrons.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ patrons.arrange(DOWN, aligned_edge = LEFT)
patrons.next_to(special_thanks, DOWN)
patrons.to_edge(vect, buff = LARGE_BUFF)
diff --git a/old_projects/highD.py b/old_projects/highD.py
index 50f07295d..a3c8afb0a 100644
--- a/old_projects/highD.py
+++ b/old_projects/highD.py
@@ -137,7 +137,7 @@ class SliderScene(Scene):
Slider(center_value = cv, **self.slider_config)
for cv in self.center_point
])
- sliders.arrange_submobjects(RIGHT, buff = self.slider_spacing)
+ sliders.arrange(RIGHT, buff = self.slider_spacing)
sliders[0].add_numbers()
sliders[0].set_value(
self.center_point[0] + np.sqrt(self.total_real_estate)
@@ -709,7 +709,7 @@ class Professionals(PiCreatureScene):
plane.scale(0.75)
examples.add(plane)
examples.add(Circle())
- examples.arrange_submobjects(RIGHT, buff = 2)
+ examples.arrange(RIGHT, buff = 2)
examples.to_edge(UP, buff = LARGE_BUFF)
labels = VGroup(*list(map(TextMobject, ["2D", "3D"])))
@@ -756,7 +756,7 @@ class Professionals(PiCreatureScene):
pi_creatures = VGroup(self.mathy, self.compy, self.physy)
for pi in pi_creatures:
pi.scale(0.7)
- pi_creatures.arrange_submobjects(RIGHT, buff = 3)
+ pi_creatures.arrange(RIGHT, buff = 3)
pi_creatures.to_edge(DOWN, buff = LARGE_BUFF)
return pi_creatures
@@ -1122,7 +1122,7 @@ class TwoDimensionalCase(Introduce4DSliders):
DecimalNumber(num**2)
for num in self.get_vector()
])
- decimals.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ decimals.arrange(RIGHT, buff = LARGE_BUFF)
decimals.next_to(rects, DOWN, LARGE_BUFF)
real_estate_word = TextMobject("``Real estate''")
@@ -1342,7 +1342,7 @@ class ThreeDCase(TwoDimensionalCase):
DecimalNumber(num**2)
for num in self.get_vector()
])
- decimals.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ decimals.arrange(RIGHT, buff = LARGE_BUFF)
decimals.next_to(rects, DOWN, LARGE_BUFF)
colors = [GREEN, RED, BLUE]
@@ -1725,7 +1725,7 @@ class ThreeDCubeCorners(Scene):
TexMobject("(%d,\\, %d,\\, %d)"%(x, y, z))
for x, y, z in it.product(*3*[[1, -1]])
])
- coordinates.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ coordinates.arrange(DOWN, aligned_edge = LEFT)
name = TextMobject("Corners: ")
name.next_to(coordinates[0], LEFT)
group = VGroup(name, coordinates)
@@ -2451,7 +2451,7 @@ class FourDBoxExampleWithSliders(ThreeDBoxExampleWithSliders):
TexMobject("(%d, %d, %d, %d)"%tup)
for tup in coordinates
])
- coordinate_mobs.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ coordinate_mobs.arrange(DOWN, aligned_edge = LEFT)
coordinate_mobs.scale(0.8)
left_column = VGroup(*coordinate_mobs[:8])
right_column = VGroup(*coordinate_mobs[8:])
@@ -3279,7 +3279,7 @@ class FunHighDSpherePhenomena(Scene):
"$\\cdot$ Sphere packing in 8 dimensions",
"$\\cdot$ Sphere packing in 24 dimensions",
])))
- items.arrange_submobjects(
+ items.arrange(
DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT
)
items.next_to(h_line, DOWN)
@@ -3446,7 +3446,7 @@ class Announcements(TeacherStudentsScene):
"$\\cdot$ Where to learn more",
"$\\cdot$ Q\\&A Followup (podcast!)",
])))
- items.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ items.arrange(DOWN, aligned_edge = LEFT)
items.next_to(h_line, DOWN)
self.play(
diff --git a/old_projects/leibniz.py b/old_projects/leibniz.py
index f50e0b991..f85a42c65 100644
--- a/old_projects/leibniz.py
+++ b/old_projects/leibniz.py
@@ -406,7 +406,7 @@ class ShowCalculus(PiCreatureScene):
frac_sum.to_corner(UP+LEFT)
frac_sum.shift(RIGHT)
rhs_group = VGroup(int1, int2, arctan, pi_fourths)
- rhs_group.arrange_submobjects(
+ rhs_group.arrange(
DOWN, buff = MED_LARGE_BUFF,
aligned_edge = LEFT
)
@@ -513,7 +513,7 @@ class Outline(PiCreatureScene):
step.set_color_by_tex("1", RED, substring = False)
step.set_color_by_tex("i", RED, substring = False)
step.set_color_by_tex("4", GREEN, substring = False)
- steps.arrange_submobjects(
+ steps.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT
@@ -619,7 +619,7 @@ class Outline(PiCreatureScene):
TexMobject("\\chi(%d)"%n)
for n in input_range
])
- chis.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ chis.arrange(RIGHT, buff = LARGE_BUFF)
chis.set_stroke(WHITE, width = 1)
numerators = VGroup()
arrows = VGroup()
@@ -837,7 +837,7 @@ class CountLatticePoints(LatticePointScene):
TexMobject(
"\\approx \\pi", "(", R, ")^2"
)
- ).arrange_submobjects(RIGHT)
+ ).arrange(RIGHT)
for R in ("10", "1{,}000{,}000", "R")
])
radius_10_eq, radius_million_eq, radius_R_eq = equations
@@ -893,7 +893,7 @@ class CountLatticePoints(LatticePointScene):
)
self.wait(2)
self.play(
- final_group.arrange_submobjects, RIGHT,
+ final_group.arrange, RIGHT,
final_group.next_to, ORIGIN, UP
)
rect = BackgroundRectangle(final_group)
@@ -1062,7 +1062,7 @@ class CountThroughRings(LatticePointScene):
mob.add_background_rectangle()
left_roots.add(VGroup(mob[0], mob[1][0]))
- left_list.arrange_submobjects(
+ left_list.arrange(
DOWN,
buff = MED_LARGE_BUFF,
aligned_edge = LEFT,
@@ -1074,7 +1074,7 @@ class CountThroughRings(LatticePointScene):
for count in counts
])
top_list.set_color(YELLOW)
- top_list.arrange_submobjects(RIGHT, aligned_edge = DOWN)
+ top_list.arrange(RIGHT, aligned_edge = DOWN)
top_list.set_width(FRAME_WIDTH - MED_LARGE_BUFF)
top_list.to_edge(UP, buff = SMALL_BUFF)
top_rect = BackgroundRectangle(top_list)
@@ -1456,7 +1456,7 @@ class IntroduceComplexConjugate(LatticePointScene):
TexMobject("(", str(x), "+", str(y), "i", ")"),
TexMobject("(", str(x), "-", str(y), "i", ")"),
)
- equation.arrange_submobjects(
+ equation.arrange(
RIGHT, buff = SMALL_BUFF,
)
VGroup(*equation[-2:]).shift(0.5*SMALL_BUFF*DOWN)
@@ -1545,7 +1545,7 @@ class IntroduceComplexConjugate(LatticePointScene):
TexMobject(str(x), "^2"),
TexMobject("-", "(", str(y), "i", ")^2")
)
- expansion.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ expansion.arrange(RIGHT, buff = SMALL_BUFF)
expansion.next_to(
VGroup(*self.equation[-2:]),
DOWN, LARGE_BUFF
@@ -2219,7 +2219,7 @@ class FactorizationPattern(Scene):
for x, y in [(2, 1), (3, 2), (4, 1), (5, 2)]
for y_str in [str(y) if y is not 1 else ""]
])
- factorizations.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ factorizations.arrange(DOWN, aligned_edge = LEFT)
factorizations.to_corner(UP+LEFT)
factorizations.shift(RIGHT)
movers = VGroup()
@@ -2560,7 +2560,7 @@ class IntroduceRecipe(Scene):
left_factors, right_factors = self.get_left_and_right_factors()
for group in left_factors, right_factors:
group.generate_target()
- group.target.arrange_submobjects(DOWN)
+ group.target.arrange(DOWN)
left_factors.target.next_to(T_chart.left_h_line, DOWN)
right_factors.target.next_to(T_chart.right_h_line, DOWN)
@@ -2646,7 +2646,7 @@ class IntroduceRecipe(Scene):
Line(ORIGIN, self.T_chart_width*RIGHT/2.0)
for x in range(2)
])
- h_lines.arrange_submobjects(RIGHT, buff = 0)
+ h_lines.arrange(RIGHT, buff = 0)
h_lines.shift(UP)
v_line = Line(self.T_chart_height*UP, ORIGIN)
v_line.move_to(h_lines.get_center(), UP)
@@ -2891,7 +2891,7 @@ class ThreeOutputsAsLatticePointsContinued(ThreeOutputsAsLatticePoints):
for words, color in zip(words_group, self.colors):
words.add_background_rectangle()
words.set_color(color)
- words_group.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words_group.arrange(DOWN, aligned_edge = LEFT)
words_group.to_corner(UP+LEFT, buff = MED_SMALL_BUFF)
angles = [np.pi/2, np.pi, -np.pi/2]
@@ -3304,7 +3304,7 @@ class SummarizeCountingRule(Show125Circle):
choices_copy.generate_target()
choices_copy.target.scale(1./0.75)
- choices_copy.target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ choices_copy.target.arrange(RIGHT, buff = SMALL_BUFF)
choices_copy.target.next_to(equals_four, RIGHT, SMALL_BUFF)
choices_copy.target.shift(0.25*SMALL_BUFF*DOWN)
self.play(
@@ -3468,7 +3468,7 @@ class IntroduceChi(FactorizationPattern):
)
])
chi_expressions.scale(0.9)
- chi_expressions.arrange_submobjects(
+ chi_expressions.arrange(
DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT
)
chi_expressions.to_corner(UP+RIGHT)
@@ -3518,7 +3518,7 @@ class IntroduceChi(FactorizationPattern):
TexMobject("\\chi(%d)"%n)
for n in input_range
])
- chis.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ chis.arrange(RIGHT, buff = LARGE_BUFF)
chis.set_stroke(WHITE, width = 1)
numbers = VGroup()
arrows = VGroup()
@@ -3706,7 +3706,7 @@ class WriteCountingRuleWithChi(SummarizeCountingRule):
TexMobject("(", "1", ")"),
TexMobject("(", "3+1", ")"),
)
- count.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ count.arrange(RIGHT, buff = SMALL_BUFF)
for i, color in zip([3, 2, 1], self.colors):
count[i][1].set_color(color)
count.next_to(
@@ -3747,7 +3747,7 @@ class WriteCountingRuleWithChi(SummarizeCountingRule):
factor.set_color_by_tex("1", color, substring = False)
factor.scale(0.8)
expression.add(factor)
- expression.arrange_submobjects(
+ expression.arrange(
DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT
)
equals_four.next_to(expression[1], LEFT, SMALL_BUFF)
@@ -3910,7 +3910,7 @@ class ExpandCountWith45(SummarizeCountingRule):
part[2].set_color(color)
factor.scale(0.8)
expression.add(factor)
- expression.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ expression.arrange(RIGHT, buff = SMALL_BUFF)
expression.next_to(
factorization[1], DOWN,
buff = LARGE_BUFF,
@@ -3975,7 +3975,7 @@ class ExpandCountWith45(SummarizeCountingRule):
plusses.add(plus)
expansion.add(plus)
expansion.add(rp)
- expansion.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ expansion.arrange(RIGHT, buff = SMALL_BUFF)
expansion.set_width(FRAME_WIDTH - LARGE_BUFF)
expansion.next_to(ORIGIN, UP)
rect = BackgroundRectangle(expansion)
@@ -4028,7 +4028,7 @@ class ExpandCountWith45(SummarizeCountingRule):
if product != products[-1]:
divisor_sum.add(TexMobject("+"))
divisor_sum.add(rp)
- divisor_sum.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ divisor_sum.arrange(RIGHT, buff = SMALL_BUFF)
divisor_sum.next_to(self.expansion, DOWN, MED_LARGE_BUFF)
rect = BackgroundRectangle(divisor_sum)
@@ -4220,7 +4220,7 @@ class CountLatticePointsInBigCircle(LatticePointScene):
TexMobject("\\vdots"),
TexMobject("\\sqrt{R^2}")
)
- radicals.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF)
+ radicals.arrange(DOWN, buff = MED_SMALL_BUFF)
radicals.set_height(FRAME_HEIGHT - MED_LARGE_BUFF)
radicals.to_edge(DOWN, buff = MED_SMALL_BUFF)
radicals.to_edge(LEFT)
@@ -4297,7 +4297,7 @@ class AddUpGrid(Scene):
plusses.add(plus)
chi_sum.add(plus)
chi_sum.add(rp)
- chi_sum.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ chi_sum.arrange(RIGHT, buff = SMALL_BUFF)
chi_sum.scale(0.7)
chi_sum.next_to(radical, RIGHT)
chi_sums.add(chi_sum)
@@ -4432,10 +4432,10 @@ class AddUpGrid(Scene):
TexMobject("\\chi(", str(d), ")"),
TexMobject("+")
)
- term.arrange_submobjects(RIGHT, SMALL_BUFF)
+ term.arrange(RIGHT, SMALL_BUFF)
term[1][1].set_color(YELLOW)
full_sum.add(term)
- full_sum.arrange_submobjects(RIGHT, SMALL_BUFF)
+ full_sum.arrange(RIGHT, SMALL_BUFF)
full_sum.scale(0.7)
full_sum.next_to(self.count_words, RIGHT, SMALL_BUFF)
@@ -4503,7 +4503,7 @@ class AddUpGrid(Scene):
new_sum.add(plus)
new_sum.add(dots)
new_sum.add(rp)
- new_sum.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ new_sum.arrange(RIGHT, buff = SMALL_BUFF)
new_sum.next_to(self.count_words, RIGHT, SMALL_BUFF)
R_squared.shift(0.5*SMALL_BUFF*UP)
R_movers = VGroup()
diff --git a/old_projects/lost_lecture.py b/old_projects/lost_lecture.py
index d9d81e0f6..b096867e1 100644
--- a/old_projects/lost_lecture.py
+++ b/old_projects/lost_lecture.py
@@ -321,7 +321,7 @@ class ShowFullStory(Scene):
image.add(
SurroundingRectangle(image, buff=0, color=WHITE)
)
- images.arrange_submobjects_in_grid(n_rows=4)
+ images.arrange_in_grid(n_rows=4)
images.scale(
1.01 * FRAME_WIDTH / images[0].get_width()
@@ -887,7 +887,7 @@ class AskAboutEllipses(TheMotionOfPlanets):
]), element_alignment_corner=ORIGIN)
equation = VGroup(d_dt, in_vect, equals, out_vect)
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.set_width(6)
equation.to_corner(DR, buff=MED_LARGE_BUFF)
@@ -1039,7 +1039,7 @@ class FeynmanElementaryQuote(Scene):
)
for image in images:
image.set_height(3)
- images.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ images.arrange(RIGHT, buff=LARGE_BUFF)
images.to_edge(DOWN, buff=LARGE_BUFF)
images[1].move_to(images[0])
crosses = VGroup(*list(map(Cross, images)))
@@ -1115,7 +1115,7 @@ class TableOfContents(Scene):
TextMobject("Kepler's 2nd law"),
TextMobject("The shape of velocities"),
)
- items.arrange_submobjects(
+ items.arrange(
DOWN, buff=LARGE_BUFF, aligned_edge=LEFT
)
items.to_edge(LEFT, buff=1.5)
@@ -1577,13 +1577,13 @@ class ProveEllipse(ShowEmergingEllipse, ShowEllipseDefiningProperty):
arrows.add(arrow)
labels_target = labels.copy()
- labels_target.arrange_submobjects(
+ labels_target.arrange(
DOWN, aligned_edge=LEFT
)
guess_start = TextMobject("Guess: Foci = ")
brace = Brace(labels_target, LEFT)
full_guess = VGroup(guess_start, brace, labels_target)
- full_guess.arrange_submobjects(RIGHT)
+ full_guess.arrange(RIGHT)
full_guess.to_corner(UR)
self.play(
@@ -2551,7 +2551,7 @@ class AngularMomentumArgument(KeplersSecondLaw):
v_perp_delta_t = VGroup(v_perp_label.copy(), delta_t.copy())
v_perp_delta_t.generate_target()
- v_perp_delta_t.target.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ v_perp_delta_t.target.arrange(RIGHT, buff=SMALL_BUFF)
v_perp_delta_t.target.next_to(height, RIGHT, SMALL_BUFF)
self.small_time_label.add(v_perp_delta_t[1])
@@ -2696,7 +2696,7 @@ class HistoryOfAngularMomentum(TeacherStudentsScene):
arrow = Arrow(ORIGIN, RIGHT)
group = VGroup(am, arrow, k2l)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.next_to(self.hold_up_spot, UL)
k2l_image = ImageMobject("Kepler2ndLaw")
diff --git a/old_projects/mug.py b/old_projects/mug.py
index 76e6e5aa8..54cd585b3 100644
--- a/old_projects/mug.py
+++ b/old_projects/mug.py
@@ -589,7 +589,7 @@ class IntroduceGraph(PiCreatureScene):
PiCreature(color = BLUE_E).flip(),
)
pis.scale(0.5)
- pis.arrange_submobjects_in_grid(buff = 2)
+ pis.arrange_in_grid(buff = 2)
return pis
class IsK33Planar(UtilitiesPuzzleScene):
@@ -861,7 +861,7 @@ class AskAboutRegions(IntroduceRegions):
front_regions.save_state()
front_regions.generate_target()
front_regions.target.scale(0.5)
- front_regions.target.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ front_regions.target.arrange(RIGHT, buff = LARGE_BUFF)
front_regions.target.to_edge(UP)
self.add(front_regions)
@@ -1330,9 +1330,9 @@ class ConcludeFiveRegions(LightUpNodes):
for line in lines.target:
line.rotate(-line.get_angle())
line.set_width(1.5)
- lines.target.arrange_submobjects(DOWN)
+ lines.target.arrange(DOWN)
line_sets.target.add(lines.target)
- line_sets.target.arrange_submobjects(DOWN)
+ line_sets.target.arrange(DOWN)
line_sets.target.center()
line_sets.target.to_edge(RIGHT)
@@ -1507,7 +1507,7 @@ class FiveRegionsFourEdgesEachGraph(Scene):
TextMobject("5", "regions"),
TextMobject("4", "edges each"),
)
- words.arrange_submobjects(DOWN)
+ words.arrange(DOWN)
words.to_edge(UP)
words[0][0].set_color(self.f_colors[0])
words[1][0].set_color(self.e_color)
@@ -1517,7 +1517,7 @@ class FiveRegionsFourEdgesEachGraph(Scene):
squares.set_stroke(width = 0)
squares.set_fill(opacity = 1)
squares.set_color_by_gradient(*self.f_colors)
- squares.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ squares.arrange(RIGHT, buff = MED_LARGE_BUFF)
squares.next_to(words, DOWN, LARGE_BUFF)
all_edges = VGroup()
all_vertices = VGroup()
@@ -1817,7 +1817,7 @@ class EulersFormulaForGeneralPlanarGraph(LightUpNodes, ThreeDScene):
group.symbols = VGroup(*list(map(TexMobject, ["-", "+", "="])))
group.generate_target()
line = VGroup(*it.chain(*list(zip(group.target, group.symbols))))
- line.arrange_submobjects(RIGHT)
+ line.arrange(RIGHT)
line.to_edge(UP, buff = MED_SMALL_BUFF)
VGroup(counts.target, counts.symbols).shift(0.75*DOWN)
for mob in count_titles.target:
diff --git a/old_projects/mvcr.py b/old_projects/mvcr.py
index aaf4806cc..be71bb816 100644
--- a/old_projects/mvcr.py
+++ b/old_projects/mvcr.py
@@ -72,7 +72,7 @@ class ComputationalNetwork(MovingCameraScene):
)
fg_group = VGroup(f_formula.group, g_formula.group)
- fg_group.arrange_submobjects(DOWN, buff=LARGE_BUFF)
+ fg_group.arrange(DOWN, buff=LARGE_BUFF)
fg_group.to_edge(UP)
x.group.next_to(fg_group, LEFT, buff=2)
h_formula.group.next_to(fg_group, RIGHT, buff=2)
@@ -413,7 +413,7 @@ class ComputationalNetwork(MovingCameraScene):
TexMobject("+"),
dg_dx.target, dh_dg.target
)
- rhs.arrange_submobjects(
+ rhs.arrange(
RIGHT,
buff=2 * SMALL_BUFF,
)
diff --git a/old_projects/name_animation.py b/old_projects/name_animation.py
index 61f6672b4..493539260 100644
--- a/old_projects/name_animation.py
+++ b/old_projects/name_animation.py
@@ -40,7 +40,7 @@ class NameAnimationScene(Scene):
TexMobject("\\times"),
Integer(1)
)
- times_n_label.arrange_submobjects(RIGHT)
+ times_n_label.arrange(RIGHT)
times_n_label.shift(FRAME_WIDTH * RIGHT / 4)
times_n_label.to_edge(UP)
diff --git a/old_projects/nn/part1.py b/old_projects/nn/part1.py
index 00e0d5e32..7f2c798cd 100644
--- a/old_projects/nn/part1.py
+++ b/old_projects/nn/part1.py
@@ -62,7 +62,7 @@ class PixelsAsSquares(VGroup):
fill_color = rgba_to_color(rgba/255.0),
)
self.add(square)
- self.arrange_submobjects_in_grid(
+ self.arrange_in_grid(
*image_mobject.pixel_array.shape[:2],
buff = 0
)
@@ -111,7 +111,7 @@ class NetworkMobject(VGroup):
self.get_layer(size)
for size in self.layer_sizes
])
- layers.arrange_submobjects(RIGHT, buff = self.layer_to_layer_buff)
+ layers.arrange(RIGHT, buff = self.layer_to_layer_buff)
self.layers = layers
self.add(self.layers)
if self.include_output_labels:
@@ -132,7 +132,7 @@ class NetworkMobject(VGroup):
)
for x in range(n_neurons)
])
- neurons.arrange_submobjects(
+ neurons.arrange(
DOWN, buff = self.neuron_to_neuron_buff
)
for neuron in neurons:
@@ -406,7 +406,7 @@ class ExampleThrees(PiCreatureScene):
)
alt_threes = VGroup(*self.three_mobs[1:])
- alt_threes.arrange_submobjects(DOWN)
+ alt_threes.arrange(DOWN)
alt_threes.set_height(FRAME_HEIGHT - 2)
alt_threes.to_edge(RIGHT)
@@ -572,7 +572,7 @@ class WriteAProgram(Scene):
arrow.next_to(three, RIGHT)
choices = VGroup(*[TexMobject(str(n)) for n in range(10)])
- choices.arrange_submobjects(DOWN)
+ choices.arrange(DOWN)
choices.set_height(FRAME_HEIGHT - 1)
choices.next_to(arrow, RIGHT)
@@ -748,7 +748,7 @@ class LayOutPlan(TeacherStudentsScene, NetworkScene):
for x in range(2)
])
videos.set_height(1.5)
- videos.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ videos.arrange(RIGHT, buff = LARGE_BUFF)
videos.next_to(self.students, UP, LARGE_BUFF)
network_mob.generate_target()
@@ -1201,7 +1201,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
self.play(rows.space_out_submobjects, 1.2)
self.play(
- rows.arrange_submobjects, RIGHT, buff = SMALL_BUFF,
+ rows.arrange, RIGHT, buff = SMALL_BUFF,
path_arc = np.pi/2,
run_time = 2
)
@@ -1716,7 +1716,7 @@ class BreakUpMacroPatterns(IntroduceEachLayer):
for m in mobs[1:-1]
])) + [mobs[-1]]
)
- equation.arrange_submobjects(RIGHT)
+ equation.arrange(RIGHT)
return equation
def make_transparent(self, image_mob):
@@ -1848,7 +1848,7 @@ class BreakUpMicroPatterns(BreakUpMacroPatterns):
MNistMobject(image_map[n][1])
for n in (1, 4, 7)
])
- digits.arrange_submobjects(RIGHT)
+ digits.arrange(RIGHT)
digits.next_to(randy, RIGHT)
self.revert_to_original_skipping_status()
@@ -2089,7 +2089,7 @@ class EdgeDetection(Scene):
edges = ImageMobject(edges_array)
group = Group(lion, edges)
group.set_height(4)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
lion_copy = lion.copy()
self.play(FadeIn(lion))
@@ -2121,7 +2121,7 @@ class ManyTasksBreakDownLikeThis(TeacherStudentsScene):
syllables, get_arrow(),
word
)
- sequence.arrange_submobjects(RIGHT)
+ sequence.arrange(RIGHT)
sequence.set_width(FRAME_WIDTH - 1)
sequence.to_edge(UP)
@@ -2181,7 +2181,7 @@ class ManyTasksBreakDownLikeThis(TeacherStudentsScene):
for x in np.arange(0, 4, 0.1)
])
result.set_stroke(width = 2)
- result.arrange_submobjects(RIGHT, buff = MED_SMALL_BUFF)
+ result.arrange(RIGHT, buff = MED_SMALL_BUFF)
result.set_height(1)
return result
@@ -2313,7 +2313,7 @@ class IntroduceWeights(IntroduceEachLayer):
TexMobject("p_%d\\!:"%(i+1)).set_color(self.weights_color)
for i in range(8)
] + [TexMobject("\\vdots")])
- p_labels.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ p_labels.arrange(DOWN, aligned_edge = LEFT)
p_labels.next_to(parameter_word, DOWN, LARGE_BUFF)
p_labels[-1].shift(SMALL_BUFF*RIGHT)
@@ -2444,7 +2444,7 @@ class IntroduceWeights(IntroduceEachLayer):
TexMobject("w_n").set_color(self.weights_color),
TexMobject("a_n")
)
- weighted_sum.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ weighted_sum.arrange(RIGHT, buff = SMALL_BUFF)
weighted_sum.to_edge(UP)
self.play(Transform(layer, active_layer))
@@ -3136,7 +3136,7 @@ class ShowRemainingNetwork(IntroduceWeights):
added_biases = TexMobject("+ 16 + 10")
group = VGroup(bias_count.prefix, added_biases)
- group.arrange_submobjects(RIGHT, SMALL_BUFF)
+ group.arrange(RIGHT, SMALL_BUFF)
group.next_to(weights_count.target[-1], DOWN, LARGE_BUFF)
bias_count.target[-1].next_to(group, DOWN)
@@ -3194,7 +3194,7 @@ class ShowRemainingNetwork(IntroduceWeights):
"Finding the right \\\\ weights and biases"
)
group = VGroup(learning, finding_words)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.scale(0.8)
group.next_to(self.final_number, DOWN, MED_LARGE_BUFF)
@@ -3410,7 +3410,7 @@ class IntroduceWeightMatrix(NetworkScene):
TexMobject("a^{(0)}_n"),
)
- weighted_sum.arrange_submobjects(RIGHT)
+ weighted_sum.arrange(RIGHT)
a1_label = TexMobject("a^{(1)}_0")
a1_label.next_to(neuron, RIGHT)
equals = TexMobject("=").next_to(a1_label, RIGHT)
@@ -3521,7 +3521,7 @@ class IntroduceWeightMatrix(NetworkScene):
VGroup(
*column[:2] + [mid_as] + [column[-1]]
- ).arrange_submobjects(DOWN)
+ ).arrange(DOWN)
column.shift(DOWN + 3.5*RIGHT)
pre_brackets = self.get_brackets(a_labels)
@@ -3561,7 +3561,7 @@ class IntroduceWeightMatrix(NetworkScene):
2, self.symbols[-2].copy()
)
w_labels.generate_target()
- w_labels.target.arrange_submobjects(RIGHT)
+ w_labels.target.arrange(RIGHT)
w_labels.target.next_to(a_column[0], LEFT, buff = 0.8)
lwb.next_to(w_labels.target, LEFT, SMALL_BUFF)
lwb.align_to(rwb, UP)
@@ -3739,7 +3739,7 @@ class IntroduceWeightMatrix(NetworkScene):
"b_0", "b_1", "\\vdots", "b_n",
])))
b_column.scale(0.85)
- b_column.arrange_submobjects(DOWN, buff = 0.35)
+ b_column.arrange(DOWN, buff = 0.35)
b_column.move_to(a_column)
b_column.set_color(BLUE)
plus.next_to(a_column_brackets, RIGHT)
@@ -3977,7 +3977,7 @@ class NeuronIsFunction(MoreHonestMNistNetworkPreview):
arrow = Arrow(ORIGIN, DOWN, color = BLUE)
thing_words = TextMobject("Thing that holds \\\\ a number")
group = VGroup(neuron_word, arrow, thing_words)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.to_corner(UP+RIGHT, buff = LARGE_BUFF)
neuron = self.network_mob.layers[2].neurons[2]
@@ -4162,7 +4162,7 @@ class NextVideo(MoreHonestMNistNetworkPreview, PiCreatureScene):
arrow = Arrow(ORIGIN, RIGHT, color = BLUE)
num_mob = TexMobject(str(num))
group = Group(image, arrow, num_mob)
- group.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ group.arrange(RIGHT, buff = SMALL_BUFF)
group.next_to(ORIGIN, RIGHT)
data_mobs.add(group)
diff --git a/old_projects/nn/part2.py b/old_projects/nn/part2.py
index cbc682415..b9760ab78 100644
--- a/old_projects/nn/part2.py
+++ b/old_projects/nn/part2.py
@@ -18,7 +18,7 @@ def get_training_image_group(train_in, train_out):
output = np.argmax(train_out)
output_tex = TexMobject(str(output)).scale(1.5)
result = Group(image, arrow, output_tex)
- result.arrange_submobjects(RIGHT)
+ result.arrange(RIGHT)
result.to_edge(UP)
return result
@@ -35,7 +35,7 @@ def get_decimal_vector(nums, with_dots = True):
if with_dots:
dots = TexMobject("\\vdots")
contents.submobjects.insert(len(decimals)/2, dots)
- contents.arrange_submobjects(DOWN)
+ contents.arrange(DOWN)
lb, rb = brackets = TexMobject("\\big[", "\\big]")
brackets.scale(2)
brackets.stretch_to_fit_height(1.2*contents.get_height())
@@ -108,7 +108,7 @@ class ShowPlan(Scene):
"Research corner",
]
])
- items.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
+ items.arrange(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
items.to_edge(LEFT, buff = LARGE_BUFF)
rect = SurroundingRectangle(VGroup(*items[1:3]))
@@ -351,7 +351,7 @@ class TrainingVsTestData(Scene):
get_training_image_group,
self.data[ci:ci+self.n_examples]
))
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.scale(0.5)
return group
@@ -439,7 +439,7 @@ class MNistDescription(Scene):
link_words = TextMobject("(links in the description)")
link_words.next_to(authors, DOWN, MED_LARGE_BUFF)
arrows = VGroup(*[Vector(DOWN) for x in range(4)])
- arrows.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ arrows.arrange(RIGHT, buff = LARGE_BUFF)
arrows.next_to(link_words, DOWN)
arrows.set_color(BLUE)
@@ -466,7 +466,7 @@ class MNistDescription(Scene):
self.get_digit_pair(v_in, v_out)
for v_in, v_out in td_group
])
- group.arrange_submobjects_in_grid(
+ group.arrange_in_grid(
n_rows = self.n_rows_per_grid,
)
group.set_height(FRAME_HEIGHT - 1)
@@ -904,7 +904,7 @@ class IntroduceCostFunction(PreviewLearning):
last_plus = term[-1]
for mob in terms[-1], symbols:
mob.remove(last_plus)
- terms.arrange_submobjects(
+ terms.arrange(
DOWN, buff = SMALL_BUFF,
aligned_edge = LEFT
)
@@ -916,7 +916,7 @@ class IntroduceCostFunction(PreviewLearning):
image_group.target.scale(0.5)
cost_of = TextMobject("Cost of").set_color(RED)
cost_group = VGroup(cost_of, image_group.target)
- cost_group.arrange_submobjects(RIGHT)
+ cost_group.arrange(RIGHT)
brace = Brace(terms, LEFT)
cost_group.next_to(brace, LEFT)
@@ -1109,7 +1109,7 @@ class IntroduceCostFunction(PreviewLearning):
DecimalNumber(n).set_fill(opacity = 0.5*n + 0.5)
for n in num_vect
])
- decimals.arrange_submobjects(DOWN)
+ decimals.arrange(DOWN)
decimals.set_height(height)
lb, rb = brackets = TexMobject("[]")
brackets.scale(2)
@@ -1145,7 +1145,7 @@ class YellAtNetwork(PiCreatureScene, PreviewLearning):
layer_copy.neurons[3].set_fill(WHITE, 1)
layer_copy.scale(1.5)
desired = Group(image, arrow, layer_copy)
- desired.arrange_submobjects(RIGHT)
+ desired.arrange(RIGHT)
desired.to_edge(UP)
q_marks = TexMobject("???").set_color(RED)
@@ -1385,7 +1385,7 @@ class EmphasizeComplexityOfCostFunction(IntroduceCostFunction):
parameter_words = TextMobject("Parameters:", w3)
parameter_words[0].set_color(GREEN)
words = VGroup(input_words, output_words, parameter_words)
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.scale(0.9)
words.next_to(ORIGIN, RIGHT)
words.shift(UP)
@@ -1951,7 +1951,7 @@ class GradientDescentAlgorithm(Scene):
TextMobject("Small step in", "$-\\nabla C$", "direction"),
TextMobject("Repeat."),
)
- words.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ words.arrange(DOWN, aligned_edge = LEFT)
words.set_width(FRAME_WIDTH - 1)
words.to_corner(DOWN+LEFT)
@@ -1993,7 +1993,7 @@ class ShowFullCostFunctionGradient(PreviewLearning):
])
dots = TexMobject("\\vdots")
decimals.submobjects.insert(3, dots)
- decimals.arrange_submobjects(DOWN)
+ decimals.arrange(DOWN)
decimals.shift(2*LEFT + 0.5*DOWN)
lb, rb = brackets = TexMobject("\\big[", "\\big]")
brackets.scale(2)
@@ -2183,7 +2183,7 @@ class NonSpatialGradientIntuition(Scene):
)
])
ws.set_color(self.w_color)
- ws.arrange_submobjects(DOWN)
+ ws.arrange(DOWN)
lb, rb = brackets = TexMobject("\\big[", "\\big]").scale(2)
brackets.stretch_to_fit_height(1.2*ws.get_height())
lb.next_to(ws, LEFT)
@@ -2267,7 +2267,7 @@ class NonSpatialGradientIntuition(Scene):
phrase.set_color_by_tex(verb, color)
w.generate_target()
group = VGroup(w.target, phrase)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
w.target.shift(0.7*SMALL_BUFF*DOWN)
group.move_to(decimal.get_center() + RIGHT, LEFT)
direction_phrases.add(phrase)
@@ -2819,7 +2819,7 @@ class TestPerformance(PreviewLearning):
word_frac, self.frac,
self.equals, self.decimal
)
- fracs.arrange_submobjects(RIGHT)
+ fracs.arrange(RIGHT)
fracs.to_corner(UP+RIGHT, buff = LARGE_BUFF)
self.add(fracs)
@@ -2855,7 +2855,7 @@ class TestPerformance(PreviewLearning):
choice_mob = TexMobject(str(choice))
choice_mob.scale(1.5)
group = VGroup(image, arrow, choice_mob)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.shift(
self.title.get_bottom()+MED_SMALL_BUFF*DOWN -\
image.get_top()
@@ -2929,7 +2929,7 @@ class ReactToPerformance(TeacherStudentsScene):
Arrow(LEFT, RIGHT, color = WHITE),
TextMobject("98\\%", "testing accuracy")
)
- title.arrange_submobjects(RIGHT)
+ title.arrange(RIGHT)
title.to_edge(UP)
title[-1][0].set_color(GREEN)
self.play(Write(title, run_time = 2))
@@ -3041,7 +3041,7 @@ class InterpretFirstWeightMatrixRows(TestPerformance):
color = self.negative_edge_color
pixel.set_fill(color, opacity = abs(shade)**(0.3))
pixel_arrays.add(pixel_array)
- pixel_arrays.arrange_submobjects_in_grid(buff = MED_LARGE_BUFF)
+ pixel_arrays.arrange_in_grid(buff = MED_LARGE_BUFF)
pixel_arrays.set_height(FRAME_HEIGHT - 2.5)
pixel_arrays.to_corner(DOWN+RIGHT)
@@ -3377,7 +3377,7 @@ class SomethingToImproveUpon(PiCreatureScene, TestPerformance):
choice.scale(2)
arrow = Vector(RIGHT, color = WHITE)
group = Group(image, arrow, choice)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.next_to(self.line, DOWN, LARGE_BUFF)
group.to_edge(LEFT, buff = LARGE_BUFF)
diff --git a/old_projects/nn/part3.py b/old_projects/nn/part3.py
index 918b0a483..3bd7e6bc9 100644
--- a/old_projects/nn/part3.py
+++ b/old_projects/nn/part3.py
@@ -95,7 +95,7 @@ class InterpretGradientComponents(GradientNudging):
cost_expression.set_color_by_tex(tex, RED)
cost_expression.next_to(cost, DOWN)
cost_group = VGroup(cost_expression, cost)
- cost_group.arrange_submobjects(RIGHT)
+ cost_group.arrange(RIGHT)
cost_group.next_to(arrow, DOWN)
self.add(rect, arrow, cost_group)
@@ -174,7 +174,7 @@ class InterpretGradientComponents(GradientNudging):
d1, TexMobject("\\vdots"),
d2, TexMobject("\\vdots"),
)
- new_vect_contents.arrange_submobjects(DOWN)
+ new_vect_contents.arrange(DOWN)
new_vect_contents.move_to(vect_contents)
new_w_terms = TexMobject(
@@ -300,12 +300,12 @@ class InterpretGradientComponents(GradientNudging):
VectorizedPoint()
for term in grad_terms
])
- points.arrange_submobjects(RIGHT)
+ points.arrange(RIGHT)
points.replace(w_terms, dim_to_match = 0)
grad_terms.generate_target()
grad_terms.target[len(grad_terms)/2].rotate(np.pi/2)
- grad_terms.target.arrange_submobjects(RIGHT)
+ grad_terms.target.arrange(RIGHT)
grad_terms.target.set_width(cost_expression.get_width())
grad_terms.target.next_to(cost_expression, DOWN)
@@ -377,7 +377,7 @@ class GetLostInNotation(PiCreatureScene):
"z" : TEAL,
})
equation.set_color_by_tex("nabla", WHITE)
- equations.arrange_submobjects(
+ equations.arrange(
DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT
)
@@ -915,7 +915,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
"w_" : w_terms.get_color(),
"a_" : a_terms.get_color(),
})
- increase_words.arrange_submobjects(
+ increase_words.arrange(
DOWN, aligned_edge = LEFT,
buff = LARGE_BUFF
)
@@ -1151,7 +1151,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
Line(LEFT, RIGHT, color = s_edge.get_color())
for s_edge in s_edges
])
- s_edges.alt_position.arrange_submobjects(DOWN, MED_SMALL_BUFF)
+ s_edges.alt_position.arrange(DOWN, MED_SMALL_BUFF)
s_edges.alt_position.to_corner(DOWN+RIGHT, LARGE_BUFF)
added_words = TextMobject("in proportion to $w_i$")
@@ -1480,7 +1480,7 @@ class ConstructGradientFromAllTrainingExamples(Scene):
Line(LEFT, RIGHT).scale(0.85*FRAME_X_RADIUS)
for x in range(6)
])
- h_lines.arrange_submobjects(DOWN, buff = 1)
+ h_lines.arrange(DOWN, buff = 1)
h_lines.set_stroke(LIGHT_GREY, 2)
h_lines.to_edge(DOWN, buff = MED_LARGE_BUFF)
h_lines.to_edge(LEFT, buff = 0)
@@ -1489,7 +1489,7 @@ class ConstructGradientFromAllTrainingExamples(Scene):
Line(UP, DOWN).scale(FRAME_Y_RADIUS - MED_LARGE_BUFF)
for x in range(self.n_examples + 1)
])
- v_lines.arrange_submobjects(RIGHT, buff = 1.4)
+ v_lines.arrange(RIGHT, buff = 1.4)
v_lines.set_stroke(LIGHT_GREY, 2)
v_lines.to_edge(LEFT, buff = 2)
@@ -2004,7 +2004,7 @@ class OrganizeDataIntoMiniBatches(Scene):
# ])
def arrange_examples_in_grid(self, examples):
- examples.arrange_submobjects_in_grid(
+ examples.arrange_in_grid(
n_rows = self.n_rows,
buff = SMALL_BUFF
)
@@ -2023,7 +2023,7 @@ class SwimmingInTerms(TeacherStudentsScene):
TextMobject("Mini-batches"),
TextMobject("Backpropagation"),
)
- terms.arrange_submobjects(DOWN)
+ terms.arrange(DOWN)
terms.to_edge(UP)
self.play(
LaggedStart(FadeIn, terms),
@@ -2521,8 +2521,8 @@ class SimplestNetworkExample(PreviewLearning):
mob.generate_target()
targets.add(mob.target)
y.generate_target()
- top_terms.target.arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
- targets.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ top_terms.target.arrange(RIGHT, buff = MED_LARGE_BUFF)
+ targets.arrange(DOWN, buff = LARGE_BUFF)
targets.center().to_corner(DOWN+LEFT)
y.target.next_to(aL.target, LEFT, LARGE_BUFF, DOWN)
@@ -2904,7 +2904,7 @@ class SimplestNetworkExample(PreviewLearning):
dC_da[0].set_color(self.cost_color)
equals = TexMobject("=")
group = VGroup(equals, dz_dw, da_dz, dC_da)
- group.arrange_submobjects(RIGHT, SMALL_BUFF)
+ group.arrange(RIGHT, SMALL_BUFF)
group.scale(self.derivative_scale_val)
group.next_to(dC_dw, RIGHT)
for mob in group[1:]:
@@ -3001,7 +3001,7 @@ class SimplestNetworkExample(PreviewLearning):
for deriv in derivs:
deriv.generate_target()
deriv_targets.add(deriv.target)
- deriv_targets.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ deriv_targets.arrange(DOWN, buff = MED_LARGE_BUFF)
deriv_targets.next_to(dC_dw, DOWN, LARGE_BUFF)
for deriv in derivs:
deriv.equals = TexMobject("=")
@@ -3056,7 +3056,7 @@ class SimplestNetworkExample(PreviewLearning):
minus.set_fill(opacity = 0)
moving_decimals.submobjects.insert(1, minus)
moving_decimals.generate_target(use_deepcopy = True)
- moving_decimals.target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ moving_decimals.target.arrange(RIGHT, buff = SMALL_BUFF)
moving_decimals.target.scale(1.5)
moving_decimals.target.next_to(
dC_da.rhs, DOWN,
@@ -3220,7 +3220,7 @@ class SimplestNetworkExample(PreviewLearning):
equals.next_to(chain_rule_equation, RIGHT)
rhs_group.generate_target()
- rhs_group.target.arrange_submobjects(RIGHT, buff = SMALL_BUFF)
+ rhs_group.target.arrange(RIGHT, buff = SMALL_BUFF)
rhs_group.target.next_to(equals, RIGHT)
rhs_group.target.shift(SMALL_BUFF*UP)
@@ -3328,7 +3328,7 @@ class SimplestNetworkExample(PreviewLearning):
"partial w" : BLUE,
"partial b" : MAROON_B,
})
- terms.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ terms.arrange(DOWN, buff = MED_LARGE_BUFF)
lb, rb = brackets = TexMobject("[]")
brackets.scale(3)
brackets.stretch_to_fit_height(1.1*terms.get_height())
@@ -3878,7 +3878,7 @@ class GeneralFormulas(SimplestNetworkExample):
edges.generate_target()
for e in edges.target:
e.rotate(-e.get_angle())
- edges.target.arrange_submobjects(DOWN)
+ edges.target.arrange(DOWN)
edges.target.move_to(edges)
edges.target.to_edge(UP)
diff --git a/old_projects/nn/playground.py b/old_projects/nn/playground.py
index 231bd18fa..d935da922 100644
--- a/old_projects/nn/playground.py
+++ b/old_projects/nn/playground.py
@@ -32,9 +32,9 @@ class Test(Scene):
# v = np.dot(W.T, sigmoid_inverse(v) - b)
# v = sigmoid(v)
# h_group.add(MNistMobject(v))
- # h_group.arrange_submobjects(LEFT)
+ # h_group.arrange(LEFT)
# group.add(h_group)
- # group.arrange_submobjects(DOWN)
+ # group.arrange(DOWN)
# group.set_height(FRAME_HEIGHT - 1)
# self.add(group)
@@ -46,9 +46,9 @@ class Test(Scene):
for a in network.get_activation_of_all_layers(
np.random.randn(784, 1)
)
- ]).arrange_submobjects(RIGHT)
+ ]).arrange(RIGHT)
for x in range(10)
- ]).arrange_submobjects(DOWN)
+ ]).arrange(DOWN)
group.set_height(FRAME_HEIGHT - 1)
self.add(group)
@@ -61,7 +61,7 @@ class Test(Scene):
opacity = 2*(sigmoid(abs(n)) - 0.5)
pixel.set_fill(color, opacity = opacity)
group.add(mob)
- group.arrange_submobjects_in_grid()
+ group.arrange_in_grid()
group.set_height(FRAME_HEIGHT - 1)
self.add(group)
@@ -70,7 +70,7 @@ class Test(Scene):
self.get_activation_images(digit, network, test_data)
for digit in range(10)
])
- image_samples.arrange_submobjects_in_grid(
+ image_samples.arrange_in_grid(
n_rows = 2, buff = LARGE_BUFF
)
image_samples.set_height(FRAME_HEIGHT - 1)
@@ -86,9 +86,9 @@ class Test(Scene):
Group(*[
MNistMobject(a)
for a in network.get_activation_of_all_layers(vect)
- ]).arrange_submobjects(RIGHT)
+ ]).arrange(RIGHT)
for vect in input_vectors[:n_examples]
- ]).arrange_submobjects(DOWN)
+ ]).arrange(DOWN)
activation_iamges.set_height(FRAME_HEIGHT - 1)
return activation_iamges
@@ -113,9 +113,9 @@ class Test(Scene):
in_vect = maximizing_input(network, layer, out)
new_out = network.get_activation_of_all_layers(in_vect)[layer]
group = Group(*list(map(MNistMobject, [in_vect, new_out])))
- group.arrange_submobjects(DOWN+RIGHT, SMALL_BUFF)
+ group.arrange(DOWN+RIGHT, SMALL_BUFF)
groups.add(group)
- groups.arrange_submobjects_in_grid()
+ groups.arrange_in_grid()
groups.set_height(FRAME_HEIGHT - 1)
self.add(groups)
@@ -126,7 +126,7 @@ class Test(Scene):
for test in test_data[3:20]
if test[1] in [4, 9]
])
- group.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ group.arrange(DOWN, buff = MED_LARGE_BUFF)
group.set_height(FRAME_HEIGHT - 1)
self.play(FadeIn(group))
@@ -134,7 +134,7 @@ class Test(Scene):
test_in, test_out = test
activations = network.get_activation_of_all_layers(test_in)
group = Group(*list(map(MNistMobject, activations)))
- group.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ group.arrange(RIGHT, buff = LARGE_BUFF)
return group
# def show_frame(self):
diff --git a/old_projects/patreon.py b/old_projects/patreon.py
index 468b8a8fe..f48f90e8d 100644
--- a/old_projects/patreon.py
+++ b/old_projects/patreon.py
@@ -47,7 +47,7 @@ class SideGigToFullTime(Scene):
TexMobject("\\$")
for x in range(10)
])
- dollar_signs.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ dollar_signs.arrange(RIGHT, buff = LARGE_BUFF)
dollar_signs.set_color(BLACK)
dollar_signs.next_to(morty.eyes, RIGHT, buff = 2*LARGE_BUFF)
@@ -138,7 +138,7 @@ class GrowingToDoList(Scene):
"Understanding entropy",
])))
lines.scale(0.65)
- lines.arrange_submobjects(DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
+ lines.arrange(DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
lines.set_color_by_gradient(BLUE_C, YELLOW)
lines.next_to(title, DOWN, buff = LARGE_BUFF/2.)
lines.to_edge(RIGHT)
@@ -190,7 +190,7 @@ class TwoTypesOfVideos(Scene):
"ODEs",
]
])
- series_list.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
+ series_list.arrange(DOWN, aligned_edge = LEFT, buff = MED_SMALL_BUFF)
series_list.set_width(FRAME_X_RADIUS-2)
series_list.next_to(series, DOWN, buff = MED_SMALL_BUFF)
series_list.to_edge(RIGHT)
@@ -524,9 +524,9 @@ class MakeALotOfPiCreaturesHappy(Scene):
VGroup(*[
Randolph()
for x in range(7)
- ]).arrange_submobjects(RIGHT, buff = MED_LARGE_BUFF)
+ ]).arrange(RIGHT, buff = MED_LARGE_BUFF)
for x in range(4)
- ]).arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ ]).arrange(DOWN, buff = MED_LARGE_BUFF)
pi_list = list(it.chain(*[
layer.submobjects
diff --git a/old_projects/pi_day.py b/old_projects/pi_day.py
index d45863f54..ce230f4df 100644
--- a/old_projects/pi_day.py
+++ b/old_projects/pi_day.py
@@ -396,7 +396,7 @@ class ManyFormulas(Scene):
TexMobject("n! \\approx \\sqrt{\\tau n} \\left(\\frac{n}{e} \\right)^n"),
TexMobject("c_n = \\frac{1}{\\tau} \\int_0^\\tau f(x) e^{inx}dx"),
)
- formulas.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ formulas.arrange(DOWN, buff = MED_LARGE_BUFF)
formulas.to_edge(LEFT)
self.play(LaggedStart(FadeIn, formulas, run_time = 3))
@@ -734,7 +734,7 @@ class ThingsNamedAfterEuler(Scene):
"Euler angles (rigid-body mechanics)",
"Euler totient function (number theory)",
])))
- group.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ group.arrange(DOWN, aligned_edge = LEFT)
group.set_height(FRAME_HEIGHT - 1)
self.play(LaggedStart(FadeIn, group, lag_ratio = 0.2, run_time = 12))
@@ -979,7 +979,7 @@ class SpecialThanks(Scene):
"Martin Mattmüller",
"Library of the Institut de France",
])))
- people.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_LARGE_BUFF)
+ people.arrange(DOWN, aligned_edge = LEFT, buff = MED_LARGE_BUFF)
people.next_to(h_line, DOWN)
self.add(title, h_line, people)
diff --git a/old_projects/putnam.py b/old_projects/putnam.py
index 272c906ac..37fecd5a6 100644
--- a/old_projects/putnam.py
+++ b/old_projects/putnam.py
@@ -24,9 +24,9 @@ class IntroducePutnam(Scene):
VGroup(*[
TextMobject("%s%d)"%(c, i))
for i in range(1, 7)
- ]).arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ ]).arrange(DOWN, buff = MED_LARGE_BUFF)
for c in ("A", "B")
- ]).arrange_submobjects(RIGHT, buff = FRAME_X_RADIUS - MED_SMALL_BUFF)
+ ]).arrange(RIGHT, buff = FRAME_X_RADIUS - MED_SMALL_BUFF)
question_groups.to_edge(LEFT)
question_groups.to_edge(DOWN, MED_LARGE_BUFF)
flat_questions = VGroup(*it.chain(*question_groups))
@@ -967,7 +967,7 @@ class RevisitTwoDCase(TwoDCase):
"Choose $P_3$ at random"
])))
words.scale(0.8)
- words.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ words.arrange(DOWN, buff = MED_LARGE_BUFF)
words.next_to(underline, DOWN)
words[1].set_color(YELLOW)
@@ -1229,7 +1229,7 @@ class Rewrite3DRandomProcedure(Scene):
"Flip coin for each line \\\\ to get $P_1$, $P_2$, $P_3$",
])))
words.scale(0.8)
- words.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ words.arrange(DOWN, buff = MED_LARGE_BUFF)
words.next_to(underline, DOWN)
words[1].set_color(YELLOW)
cross = Cross(words[0])
@@ -1311,7 +1311,7 @@ class ProblemSolvingTakeaways(Scene):
])
points[0].set_color(BLUE)
points[1].set_color(YELLOW)
- points.arrange_submobjects(
+ points.arrange(
DOWN, buff = LARGE_BUFF,
aligned_edge = LEFT
)
@@ -1392,7 +1392,7 @@ class BrilliantPuzzle(PiCreatureScene):
def get_test(self):
lines = VGroup(*[Line(ORIGIN, 0.5*RIGHT) for x in range(6)])
- lines.arrange_submobjects(DOWN, buff = SMALL_BUFF)
+ lines.arrange(DOWN, buff = SMALL_BUFF)
rect = SurroundingRectangle(lines)
rect.set_stroke(WHITE)
lines.set_stroke(WHITE, 2)
diff --git a/old_projects/qa_round_two.py b/old_projects/qa_round_two.py
index 9b7b477d5..8baeccbcb 100644
--- a/old_projects/qa_round_two.py
+++ b/old_projects/qa_round_two.py
@@ -26,7 +26,7 @@ class Announcements(PiCreatureScene):
"The case against Net Neutrality?",
]
])
- announcements.arrange_submobjects(
+ announcements.arrange(
DOWN,
buff = LARGE_BUFF,
aligned_edge = LEFT,
@@ -75,7 +75,7 @@ class PowersOfTwo(Scene):
self.add(mob)
m1, m2 = mob.copy(), mob.copy()
group = VGroup(m1, m2)
- group.arrange_submobjects(
+ group.arrange(
vect, buff = SMALL_BUFF
)
if group.get_height() > max_height:
diff --git a/old_projects/quat3d.py b/old_projects/quat3d.py
index a0e4e5aa6..f9e37b02b 100644
--- a/old_projects/quat3d.py
+++ b/old_projects/quat3d.py
@@ -29,7 +29,7 @@ class QuaternionLabel(VGroup):
decimals[2], TexMobject("j"),
decimals[3], TexMobject("k"),
)
- self.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ self.arrange(RIGHT, buff=SMALL_BUFF)
self.decimals = decimals
@@ -198,7 +198,7 @@ class Introduction(QuaternionHistory):
# for k in range(4)
# ])
title = VGroup(title_word, title_equation)
- title.arrange_submobjects(RIGHT)
+ title.arrange(RIGHT)
title.to_edge(UP)
images_group = self.get_dissenter_images_quotes_and_names()
@@ -255,7 +255,7 @@ class WhoCares(TeacherStudentsScene):
logo.move_to(quote.get_corner(UR))
quote.add(logo)
- quotes.arrange_submobjects_in_grid()
+ quotes.arrange_in_grid()
quotes.set_height(4)
quotes.to_corner(UL)
@@ -411,7 +411,7 @@ class ShowSeveralQuaternionRotations(SpecialThreeDScene):
left_q_label.next_to(point_label, LEFT)
right_q_label.next_to(point_label, RIGHT)
group = VGroup(left_q_label, point_label, right_q_label)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.set_width(FRAME_WIDTH - 1)
group.to_edge(UP)
self.add_fixed_in_frame_mobjects(BackgroundRectangle(group))
@@ -513,7 +513,7 @@ class PauseAndPlayOverlay(Scene):
arrow = Vector(RIGHT, color=WHITE)
interact = TextMobject("Interact...")
group = VGroup(pause, arrow, interact)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.scale(2)
not_yet = TextMobject("...well, not yet")
@@ -673,7 +673,7 @@ class EulerAnglesAndGimbal(ShowSeveralQuaternionRotations):
TexMobject("\\gamma").set_color(PINK),
)
angle_labels.scale(2)
- angle_labels.arrange_submobjects(RIGHT, buff=MED_LARGE_BUFF)
+ angle_labels.arrange(RIGHT, buff=MED_LARGE_BUFF)
angle_labels.next_to(title, DOWN, aligned_edge=LEFT)
self.angle_labels = angle_labels
@@ -681,7 +681,7 @@ class EulerAnglesAndGimbal(ShowSeveralQuaternionRotations):
Arrow(LEFT, RIGHT, color=WHITE),
TextMobject("Gimbal lock").scale(1.5),
)
- gl_label.arrange_submobjects(RIGHT)
+ gl_label.arrange(RIGHT)
gl_label.next_to(title, RIGHT)
self.gimbal_lock_label = gl_label
@@ -1036,7 +1036,7 @@ class ComplexNumberRotation(Scene):
lp1, new_left_z, rp1,
lp2, new_right_z, rp2,
)
- top_line.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ top_line.arrange(RIGHT, buff=SMALL_BUFF)
top_line.set_width(rect.get_width() - 1)
top_line.next_to(rect.get_top(), DOWN, MED_SMALL_BUFF)
@@ -1333,7 +1333,7 @@ class RuleForQuaternionRotations(EulerAnglesAndGimbal):
)
for i in 1, 3:
result[i][1].set_color(YELLOW)
- result.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ result.arrange(RIGHT, buff=SMALL_BUFF)
result.scale(0.7)
return result
diff --git a/old_projects/quaternions.py b/old_projects/quaternions.py
index 7e89ecfa2..3b9d8aee7 100644
--- a/old_projects/quaternions.py
+++ b/old_projects/quaternions.py
@@ -385,7 +385,7 @@ class RubiksCube(VGroup):
self.create_square(color)
for x in range(9)
])
- squares.arrange_submobjects_in_grid(
+ squares.arrange_in_grid(
3, 3,
buff=0
)
@@ -701,7 +701,7 @@ class QuaternionHistory(Scene):
cross_rhs
)
for product in dot_product, cross_product:
- product.arrange_submobjects(RIGHT, buff=2 * SMALL_BUFF)
+ product.arrange(RIGHT, buff=2 * SMALL_BUFF)
product.set_height(1.5)
dot_product.next_to(date, DOWN, buff=MED_LARGE_BUFF)
dot_product.to_edge(LEFT, buff=LARGE_BUFF)
@@ -739,7 +739,7 @@ class QuaternionHistory(Scene):
for color in colors
])
students.set_height(2)
- students.arrange_submobjects(RIGHT)
+ students.arrange(RIGHT)
students.set_width(FRAME_WIDTH - hamilton.get_width() - 1)
students.to_corner(DL)
@@ -769,7 +769,7 @@ class QuaternionHistory(Scene):
image_labels.add(label)
images.add(image)
images_with_labels.add(Group(image, label))
- images_with_labels.arrange_submobjects(RIGHT)
+ images_with_labels.arrange(RIGHT)
images_with_labels.next_to(hamilton, LEFT, LARGE_BUFF)
images_with_labels.shift(MED_LARGE_BUFF * DOWN)
society_title = TextMobject("Quaternion society")
@@ -962,7 +962,7 @@ class QuaternionHistory(Scene):
quotes.add(quote)
images_with_quotes.add(Group(image, label, quote))
- images_with_quotes.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ images_with_quotes.arrange(RIGHT, buff=LARGE_BUFF)
images_with_quotes.to_edge(DOWN, MED_LARGE_BUFF)
return Group(images, quotes, names)
@@ -1082,7 +1082,7 @@ class QuantumSpin(Scene):
z_group = VGroup(electron.copy(), z_ca, Dot(color=BLUE))
groups = VGroup(x_group, y_group, z_group)
- groups.arrange_submobjects(RIGHT, buff=1.5)
+ groups.arrange(RIGHT, buff=1.5)
groups.move_to(UP)
y_ca.rotation = Rotating(
@@ -1178,7 +1178,7 @@ class TableOfContents(Scene):
)
for chapter in chapters:
chapter.space_out_submobjects(1.5)
- chapters.arrange_submobjects(
+ chapters.arrange(
DOWN, buff=1.5, aligned_edge=LEFT
)
chapters.to_edge(LEFT)
@@ -1240,7 +1240,7 @@ class IntroduceLinusTheLinelander(Scene):
TexMobject("3 + 4 = 7"),
TexMobject("(-2) \\cdot 3 = -6"),
)
- algebra.arrange_submobjects(DOWN)
+ algebra.arrange(DOWN)
algebra.next_to(number_line, DOWN, LARGE_BUFF)
algebra.shift(3 * RIGHT)
@@ -1529,13 +1529,13 @@ class DefineComplexNumbersPurelyAlgebraically(Scene):
VGroup(z1.target, z1.parens),
VGroup(z2, z2.parens),
)
- product.arrange_submobjects(RIGHT, SMALL_BUFF)
+ product.arrange(RIGHT, SMALL_BUFF)
product.move_to(2 * RIGHT + 2 * UP)
foil = VGroup(*map(TextMobject, [
"First", "Outside", "Inside", "Last",
]))
- foil.arrange_submobjects(
+ foil.arrange(
DOWN, buff=MED_SMALL_BUFF,
aligned_edge=LEFT
)
@@ -1562,7 +1562,7 @@ class DefineComplexNumbersPurelyAlgebraically(Scene):
z1.imag.targets[0], get_cdot(), z2.real.targets[1], get_plus(),
z1.imag.targets[1], get_cdot(), z2.imag.targets[1],
)
- expansion.arrange_submobjects(RIGHT, buff=0.15)
+ expansion.arrange(RIGHT, buff=0.15)
expansion.next_to(product, DOWN, buff=LARGE_BUFF)
expansion_parts = VGroup(*[
expansion[4 * i: 4 * i + 3]
@@ -1586,7 +1586,7 @@ class DefineComplexNumbersPurelyAlgebraically(Scene):
z1[2].copy(), get_cdot(), z2[0].copy(),
get_rp(), TexMobject("i")
)
- final_prouct.arrange_submobjects(RIGHT, buff=0.15)
+ final_prouct.arrange(RIGHT, buff=0.15)
final_prouct.next_to(expansion, DOWN, buff=2)
final_arrows = VGroup()
for i, brace in zip([1, 11, 15, 5], expansion_part_braces):
@@ -1734,7 +1734,7 @@ class TextbookQuaternionDefinition(TeacherStudentsScene):
"jk = -kj = i",
]
])
- defining_products.arrange_submobjects(DOWN)
+ defining_products.arrange(DOWN)
defining_products.next_to(self.students, UP, LARGE_BUFF)
def_rect = SurroundingRectangle(defining_products)
@@ -1788,7 +1788,7 @@ class ProblemsWhereComplexNumbersArise(Scene):
),
TextMobject("Frequency analysis")
)
- problems.arrange_submobjects(
+ problems.arrange(
DOWN, buff=LARGE_BUFF, aligned_edge=LEFT
)
for problem in problems:
@@ -1835,7 +1835,7 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples):
TexMobject("z="),
DecimalNumber(self.z, num_decimal_places=0)
)
- z_label.arrange_submobjects(
+ z_label.arrange(
RIGHT, buff=SMALL_BUFF,
)
z_label.next_to(z_dot, UP, buff=SMALL_BUFF)
@@ -1850,7 +1850,7 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples):
TexMobject("w="),
DecimalNumber(self.w, num_decimal_places=0)
)
- w_label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ w_label.arrange(RIGHT, buff=SMALL_BUFF)
w_label.next_to(w_dot, DOWN, buff=SMALL_BUFF)
w_label.set_color(self.w_color)
w_label.add_background_rectangle()
@@ -1949,7 +1949,7 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples):
zero_eq = TexMobject("z \\cdot 0 = 0")
one_eq = TexMobject("z \\cdot 1 = z")
equations = VGroup(zero_eq, one_eq)
- equations.arrange_submobjects(DOWN)
+ equations.arrange(DOWN)
equations.scale(1.5)
for eq in equations:
eq.add_background_rectangle()
@@ -1960,7 +1960,7 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples):
TexMobject("z \\cdot w ="),
DecimalNumber(product, num_decimal_places=0)
)
- product_label.arrange_submobjects(RIGHT)
+ product_label.arrange(RIGHT)
product_label[0].shift(0.025 * DOWN)
product_label.next_to(product_dot, UP, SMALL_BUFF)
product_label.add_background_rectangle()
@@ -3269,7 +3269,7 @@ class MentionImpossibilityOf3dNumbers(TeacherStudentsScene):
TexMobject("ij = ?"),
TexMobject("ji = ?"),
)
- equations.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ equations.arrange(RIGHT, buff=LARGE_BUFF)
equations.scale(1.5)
equations.to_edge(UP)
self.add(equations)
@@ -3316,7 +3316,7 @@ class SphereExamplePointsDecimal(Scene):
decimals[1], TexMobject("i"), TexMobject("+"),
decimals[2], TexMobject("j"),
)
- number_label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ number_label.arrange(RIGHT, buff=SMALL_BUFF)
number_label.to_corner(UL)
point = VectorizedPoint(OUT)
@@ -4206,7 +4206,7 @@ class IntroduceQuaternions(Scene):
[GREEN, RED, BLUE],
)
])
- three_axes.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ three_axes.arrange(RIGHT, buff=LARGE_BUFF)
three_axes.next_to(number, DOWN, LARGE_BUFF)
self.play(LaggedStart(FadeInFromLarge, three_axes))
@@ -4298,7 +4298,7 @@ class IntroduceQuaternions(Scene):
)
numbers = VGroup(number_2d, number_3d, number_4d)
for number in numbers:
- number.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ number.arrange(RIGHT, buff=SMALL_BUFF)
for part in number:
if isinstance(part, TexMobject):
# part.set_color_by_tex_to_color_map({
@@ -4313,7 +4313,7 @@ class IntroduceQuaternions(Scene):
number[5].set_color(RED)
if len(number) > 8:
number[8].set_color(BLUE)
- numbers.arrange_submobjects(
+ numbers.arrange(
DOWN, buff=2, aligned_edge=LEFT
)
numbers.center()
@@ -4409,7 +4409,7 @@ class ShowDotProductCrossProductFromOfQMult(Scene):
TexMobject("{}_{} = ".format(v_tex, i)),
vector,
)
- group.arrange_submobjects(RIGHT, SMALL_BUFF)
+ group.arrange(RIGHT, SMALL_BUFF)
group.next_to(brace, UP)
braces.add(brace)
@@ -4647,9 +4647,9 @@ class SphereProjectionsWrapper(Scene):
VGroup(*[
ScreenRectangle(height=3)
for x in range(3)
- ]).arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ ]).arrange(RIGHT, buff=LARGE_BUFF)
for y in range(2)
- ]).arrange_submobjects(DOWN, buff=2 * LARGE_BUFF)
+ ]).arrange(DOWN, buff=2 * LARGE_BUFF)
rect_rows.set_width(FRAME_WIDTH - 1)
sphere_labels = VGroup(
@@ -4730,7 +4730,7 @@ class HypersphereStereographicProjection(SpecialThreeDScene):
coords[2], TexMobject("j"),
coords[3], TexMobject("k"),
)
- label.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ label.arrange(RIGHT, buff=SMALL_BUFF)
label.to_corner(UR)
def update_label(label):
@@ -5192,7 +5192,7 @@ class RuleOfQuaternionMultiplicationOverlay(Scene):
TexMobject("i", "\\cdot", "k", "=", "-j", **kwargs),
)
i_products.scale(2)
- i_products.arrange_submobjects(
+ i_products.arrange(
DOWN, buff=MED_LARGE_BUFF,
aligned_edge=LEFT,
)
@@ -5669,7 +5669,7 @@ class JMultiplicationChart(Scene):
TexMobject("j", "\\cdot", "k", "=", "i", **kwargs),
)
j_products.scale(2)
- j_products.arrange_submobjects(
+ j_products.arrange(
DOWN, buff=MED_LARGE_BUFF,
aligned_edge=LEFT,
)
diff --git a/old_projects/sphere_area.py b/old_projects/sphere_area.py
index 4fc4daa2b..2f228a82d 100644
--- a/old_projects/sphere_area.py
+++ b/old_projects/sphere_area.py
@@ -190,7 +190,7 @@ class AskAboutShadowRelation(SpecialThreeDScene):
)
shadows = VGroup(*[shadow.copy() for x in range(4)])
- shadows.arrange_submobjects_in_grid(buff=MED_LARGE_BUFF)
+ shadows.arrange_in_grid(buff=MED_LARGE_BUFF)
shadows.to_edge(RIGHT)
area_label = TexMobject(
@@ -348,7 +348,7 @@ class PreviewTwoMethods(MovingCameraScene):
stroke_color=WHITE,
stroke_width=5
))
- thumbnails.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
+ thumbnails.arrange(RIGHT, buff=LARGE_BUFF)
title = TextMobject("Two proofs")
title.scale(2)
@@ -571,7 +571,7 @@ class UnfoldCircles(Scene):
Line(radius * UP, ORIGIN).set_stroke(WHITE, 2)
for x in range(4)
])
- radii_lines.arrange_submobjects_in_grid(buff=1.3)
+ radii_lines.arrange_in_grid(buff=1.3)
radii_lines[2:].shift(RIGHT)
radii_lines.next_to(rect_group, DOWN, buff=1.3)
R_labels = VGroup(*[
@@ -998,7 +998,7 @@ class ShowProjection(SphereCylinderScene):
eq_rects.scale(2)
equals = TexMobject("=")
equation = VGroup(lhs, equals, rhs)
- equation.arrange_submobjects(RIGHT)
+ equation.arrange(RIGHT)
equation.to_corner(UR)
brace = Brace(Line(ORIGIN, 0.5 * RIGHT), DOWN)
@@ -1233,7 +1233,7 @@ class JustifyLengthStretch(ShowProjection):
TexMobject("\\sim"),
big_triangle.copy().rotate(-3 * DEGREES)
)
- equation.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ equation.arrange(RIGHT, buff=SMALL_BUFF)
equation.to_corner(UL)
eq_d = TexMobject("d").next_to(equation[0], DOWN, SMALL_BUFF)
eq_R = TexMobject("R").next_to(equation[2], DOWN, SMALL_BUFF)
@@ -1994,7 +1994,7 @@ class SameEffectAsRotating(Scene):
arrow = Arrow(ORIGIN, RIGHT, buff=0, color=WHITE)
group = VGroup(rect1, arrow, rect2)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.center()
moving_rect = rect1.copy()
@@ -2081,7 +2081,7 @@ class ShowParameterization(Scene):
}
)
)
- ranges.arrange_submobjects(DOWN)
+ ranges.arrange(DOWN)
ranges.next_to(vector, DOWN)
self.add(vector)
@@ -2235,8 +2235,8 @@ class SequenceOfSpheres(SphereCylinderScene):
for group in groups:
group.add(self.get_oriented_tex("?").scale(2))
- group.arrange_submobjects(RIGHT, buff=LARGE_BUFF)
- groups.arrange_submobjects(IN, buff=1.5)
+ group.arrange(RIGHT, buff=LARGE_BUFF)
+ groups.arrange(IN, buff=1.5)
all_equals = VGroup()
for sphere, cylinder in zip(spheres, cylinders):
@@ -2428,7 +2428,7 @@ class RoleOfCalculus(SpecialThreeDScene):
sphere.rotate(70 * DEGREES, axis=LEFT)
group = VGroup(calc, arrow, sphere)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.shift(0.5 * RIGHT)
cross = Cross(group[:2], stroke_width=10)
@@ -2628,7 +2628,7 @@ class AskAboutDirectConnection(TeacherStudentsScene, SpecialThreeDScene):
for mob in group:
mob.set_height(1.5)
formula.scale(0.5)
- group.arrange_submobjects(RIGHT, buff=1.5)
+ group.arrange(RIGHT, buff=1.5)
group.to_edge(UP, buff=2)
group[1:3].to_edge(UP)
@@ -3596,7 +3596,7 @@ class SpherePatronThanks(Scene):
column_size = 15
for n in range(0, len(patrons), column_size):
column = patrons[n:n + column_size]
- column.arrange_submobjects(
+ column.arrange(
DOWN,
aligned_edge=LEFT
)
@@ -3678,7 +3678,7 @@ class Thumbnail(SpecialThreeDScene):
circles.set_stroke(WHITE, 2)
circles.set_fill(BLUE_E, 1)
circles[0].set_fill(GREY_BROWN)
- circles.arrange_submobjects_in_grid()
+ circles.arrange_in_grid()
for circle in circles:
formula = TexMobject("\\pi", "R", "^2")
formula.set_color_by_tex("R", YELLOW)
@@ -3690,7 +3690,7 @@ class Thumbnail(SpecialThreeDScene):
equals.scale(3)
group = VGroup(sphere, equals, circles)
- group.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ group.arrange(RIGHT, buff=MED_SMALL_BUFF)
equals.shift(3 * SMALL_BUFF * RIGHT)
why = TextMobject("Why?!")
diff --git a/old_projects/triangle_of_power/end.py b/old_projects/triangle_of_power/end.py
index e9b3dccb7..3523594bb 100644
--- a/old_projects/triangle_of_power/end.py
+++ b/old_projects/triangle_of_power/end.py
@@ -15,7 +15,7 @@ class DontLearnFromSymbols(Scene):
TexMobject("="),
TOP(2, "x+y")
)
- equation.arrange_submobjects()
+ equation.arrange()
q_marks = TextMobject("???")
q_marks.set_color(YELLOW)
q_marks.next_to(randy, UP)
@@ -58,7 +58,7 @@ class AsymmetriesInTheMath(Scene):
assyms_of_top = VMobject(
TextMobject("Asymmetries of "),
TOP("a", "b", "c", radius = 0.75).set_color(BLUE)
- ).arrange_submobjects()
+ ).arrange()
assyms_of_top.to_edge(UP)
assyms_of_math = TextMobject("""
Asymmetries of
@@ -182,7 +182,7 @@ class TriangleOfPowerIsBetter(Scene):
])))
for mob, color in zip(alts.split(), OPERATION_COLORS):
mob.set_color(color)
- alts.arrange_submobjects(DOWN)
+ alts.arrange(DOWN)
greater_than = TexMobject(">")
top.next_to(greater_than, LEFT)
alts.next_to(greater_than, RIGHT)
@@ -253,13 +253,13 @@ class Qwerty(Scene):
TextMobject(list("ASDFGHJKL")),
TextMobject(list("ZXCVBNM")),
)
- qwerty.arrange_submobjects(DOWN)
+ qwerty.arrange(DOWN)
dvorak = VMobject(
TextMobject(list("PYFGCRL")),
TextMobject(list("AOEUIDHTNS")),
TextMobject(list("QJKXBMWVZ")),
)
- dvorak.arrange_submobjects(DOWN)
+ dvorak.arrange(DOWN)
d1, d2, d3 = dvorak.split()
d1.shift(0.9*RIGHT)
d3.shift(0.95*RIGHT)
@@ -278,7 +278,7 @@ class ShowLog(Scene):
TOP(2, None, "y"),
TexMobject("="),
TOP(2, None, "xy")
- ]).arrange_submobjects()
+ ]).arrange()
old_eq = TexMobject("\\log_2(x) + \\log_2(y) = \\log_2(xy)")
old_eq.to_edge(UP)
diff --git a/old_projects/triangle_of_power/triangle.py b/old_projects/triangle_of_power/triangle.py
index 8c1de6164..fabcb378c 100644
--- a/old_projects/triangle_of_power/triangle.py
+++ b/old_projects/triangle_of_power/triangle.py
@@ -574,7 +574,7 @@ class MultiplyWithConstantTop(Scene):
top_exp_equation = VMobject(
top1, times, top2, equals, top3
)
- top_exp_equation.arrange_submobjects()
+ top_exp_equation.arrange()
old_style_exp = TexMobject("(x^3)(y^3) = (xy)^3")
old_style_exp.to_edge(UP)
old_style_exp.set_color(GREEN)
@@ -612,7 +612,7 @@ class RightStaysConstantQ(Scene):
equation = VMobject(
top1, q_mark, top2, TexMobject("="), top3
)
- equation.arrange_submobjects(buff = 0.7)
+ equation.arrange(buff = 0.7)
symbols_at_top = VMobject(*[
top.values[1]
for top in (top1, top2, top3)
@@ -697,7 +697,7 @@ class ConstantLowerRight(Scene):
equation = VMobject(
top1, big_oplus, top2, equals, top3
)
- equation.arrange_submobjects()
+ equation.arrange()
top3.shift(0.5*RIGHT)
x, y, xy = [
t.put_on_vertex(0, s)
diff --git a/old_projects/triples.py b/old_projects/triples.py
index 6206a351f..c3821277e 100644
--- a/old_projects/triples.py
+++ b/old_projects/triples.py
@@ -295,7 +295,7 @@ class BabylonianTablets(Scene):
tex = tex.replace(",", "{,}")
triple = TexMobject(tex)
triples.add(triple)
- triples.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ triples.arrange(DOWN, aligned_edge = LEFT)
triples.set_height(FRAME_HEIGHT - LARGE_BUFF)
triples.to_edge(RIGHT)
@@ -1069,7 +1069,7 @@ class OneMoreExample(Scene):
for i in 0, 2, 3:
final_line[i].set_color(GREEN)
lines = VGroup(top_line, second_line, final_line)
- lines.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ lines.arrange(DOWN, buff = MED_LARGE_BUFF)
lines.next_to(rect.get_top(), DOWN)
minus = TexMobject("-").scale(0.9)
minus.move_to(second_line[3])
@@ -1496,9 +1496,9 @@ class WriteGeneralFormula(GeneralExample):
triple_mobs.add(triple_mob)
pair_mob.scale(0.75)
triple_mob.scale(0.75)
- pair_mobs.arrange_submobjects(DOWN)
+ pair_mobs.arrange(DOWN)
pair_mobs.next_to(uv_title, DOWN, MED_LARGE_BUFF)
- triple_mobs.arrange_submobjects(DOWN)
+ triple_mobs.arrange(DOWN)
triple_mobs.next_to(triple_title, DOWN, MED_LARGE_BUFF)
self.play(*list(map(FadeIn, [
@@ -3035,7 +3035,7 @@ class Thumbnail(DrawRadialLines):
"8^2 + 15^2 = 17^2",
"\\vdots"
])))
- triples.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ triples.arrange(DOWN, buff = MED_LARGE_BUFF)
triples.next_to(rect.get_top(), DOWN)
self.add(rect, triples)
@@ -3074,7 +3074,7 @@ class Poster(DrawRadialLines):
# "8^2 + 15^2 = 17^2",
# "\\vdots"
# ]))
- # triples.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF)
+ # triples.arrange(DOWN, buff = MED_LARGE_BUFF)
# triples.next_to(rect.get_top(), DOWN)
# self.add(rect, triples)
diff --git a/old_projects/turbulence.py b/old_projects/turbulence.py
index 46e508b64..db8e915d1 100644
--- a/old_projects/turbulence.py
+++ b/old_projects/turbulence.py
@@ -245,7 +245,7 @@ class Diffusion(VMobject):
def add_dots(self):
dots = VGroup(*[Dot() for x in range(self.n_dots)])
- dots.arrange_submobjects_in_grid(buff=SMALL_BUFF)
+ dots.arrange_in_grid(buff=SMALL_BUFF)
dots.center()
dots.set_height(self.height)
dots.sort_submobjects(lambda p: p[0])
@@ -333,7 +333,7 @@ class NavierStokesEquations(TexMobject):
word_mobs.add(word_mob)
braces.add(brace)
result.add(VGroup(brace, word_mob))
- word_mobs[1:].arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ word_mobs[1:].arrange(RIGHT, buff=MED_SMALL_BUFF)
word_mobs[1:].next_to(braces[2], DOWN, SMALL_BUFF)
word_mobs[1].set_color(RED)
word_mobs[2].set_color(GREEN)
@@ -486,7 +486,7 @@ class JokeRingEquation(Scene):
line = Line(LEFT, RIGHT).set_width(items.get_width() + 1)
items.add(line)
items.add(TextMobject("Vortex ring"))
- items.arrange_submobjects(DOWN, buff=MED_LARGE_BUFF, aligned_edge=LEFT)
+ items.arrange(DOWN, buff=MED_LARGE_BUFF, aligned_edge=LEFT)
line.shift(LEFT)
plus = TexMobject("+")
plus.next_to(line.get_left(), UR, SMALL_BUFF)
@@ -575,7 +575,7 @@ class CarefulWithLasers(TeacherStudentsScene):
),
Line(ORIGIN, 10 * RIGHT, color=GREEN_SCREEN)
)
- laser.arrange_submobjects(RIGHT, buff=0)
+ laser.arrange(RIGHT, buff=0)
laser.rotate(45 * DEGREES)
laser.shift(randy.get_corner(UR) - laser[0].get_center() + 0.1 * DR)
@@ -749,7 +749,7 @@ class AskAboutTurbulence(TeacherStudentsScene):
TextMobject("- Chaos"),
TextMobject("- Diffusion"),
)
- words.arrange_submobjects(
+ words.arrange(
DOWN, buff=1.25,
aligned_edge=LEFT
)
@@ -845,7 +845,7 @@ class HighCurlFieldBreakingLayers(Scene):
self.get_line()
for x in range(20)
])
- lines.arrange_submobjects(DOWN, buff=MED_SMALL_BUFF)
+ lines.arrange(DOWN, buff=MED_SMALL_BUFF)
lines[0::2].set_color(BLUE)
lines[1::2].set_color(RED)
all_dots = VGroup(*it.chain(*lines))
@@ -864,7 +864,7 @@ class HighCurlFieldBreakingLayers(Scene):
def get_line(self):
line = VGroup(*[Dot() for x in range(100)])
line.set_height(0.1)
- line.arrange_submobjects(RIGHT, buff=0)
+ line.arrange(RIGHT, buff=0)
line.set_width(10)
return line
@@ -894,7 +894,7 @@ class VorticitySynonyms(Scene):
words[0].set_color_by_tex("vorticity", BLUE)
words[1].set_color_by_tex("nabla", BLUE)
words[2].set_color_by_tex("swirly", BLUE)
- words.arrange_submobjects(
+ words.arrange(
DOWN,
aligned_edge=LEFT,
buff=MED_LARGE_BUFF
@@ -1033,7 +1033,7 @@ class ShowNavierStokesEquations(Scene):
"Given a start state...",
"...how does it evolve?"
)
- words.arrange_submobjects(RIGHT, buff=2)
+ words.arrange(RIGHT, buff=2)
words.next_to(self.equations, DOWN, LARGE_BUFF)
@@ -1235,14 +1235,14 @@ class FiguresOfFluidDynamics(Scene):
ImageMobject(name.replace(" ", "_"), height=3)
for name in names
])
- images.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ images.arrange(RIGHT, buff=MED_SMALL_BUFF)
image_groups = Group()
for image, name in zip(images, names):
name_mob = TextMobject(name)
name_mob.scale(0.6)
name_mob.next_to(image, DOWN)
image_groups.add(Group(image, name_mob))
- image_groups.arrange_submobjects_in_grid(2, 3)
+ image_groups.arrange_in_grid(2, 3)
image_groups.set_height(FRAME_HEIGHT - 1)
self.play(LaggedStart(
@@ -1283,7 +1283,7 @@ class KineticEnergyBreakdown(Scene):
TextMobject("- Big moving things"),
TextMobject("- Heat"),
)
- left_items.arrange_submobjects(DOWN, aligned_edge=LEFT)
+ left_items.arrange(DOWN, aligned_edge=LEFT)
left_items.next_to(lc_title, DOWN, MED_LARGE_BUFF)
left_items.to_edge(LEFT)
diff --git a/old_projects/uncertainty.py b/old_projects/uncertainty.py
index 237fa0836..c6a2b78fc 100644
--- a/old_projects/uncertainty.py
+++ b/old_projects/uncertainty.py
@@ -515,7 +515,7 @@ class ShowPlan(PiCreatureScene):
word[2].scale(0.75)
word[2].next_to(word[1], DOWN, buff = 1.5*SMALL_BUFF)
words.add(word)
- words.arrange_submobjects(DOWN, aligned_edge = LEFT, buff = MED_LARGE_BUFF)
+ words.arrange(DOWN, aligned_edge = LEFT, buff = MED_LARGE_BUFF)
words.to_edge(LEFT)
return words
@@ -688,7 +688,7 @@ class TwoCarsAtRedLight(Scene):
car1, car2 = cars = self.cars = VGroup(*[
Car() for x in range(2)
])
- cars.arrange_submobjects(RIGHT, buff = LARGE_BUFF)
+ cars.arrange(RIGHT, buff = LARGE_BUFF)
cars.next_to(
traffic_light, LEFT,
buff = LARGE_BUFF, aligned_edge = DOWN
@@ -1037,7 +1037,7 @@ class VariousMusicalNotes(Scene):
"long" : GREEN,
"wide" : GREEN,
}, case_sensitive = False)
- phrases.arrange_submobjects(DOWN)
+ phrases.arrange(DOWN)
phrases.to_edge(UP)
long_graph = FunctionGraph(
@@ -1082,7 +1082,7 @@ class CrossOutDefinitenessAndCertainty(TeacherStudentsScene):
TextMobject("Definiteness"),
TextMobject("Certainty"),
)
- words.arrange_submobjects(DOWN)
+ words.arrange(DOWN)
words.next_to(self.teacher, UP+LEFT)
crosses = VGroup(*list(map(Cross, words)))
@@ -2663,7 +2663,7 @@ class AmbiguityInLongEchos(IntroduceDopplerRadar, PiCreatureScene):
))
self.wait()
self.play(
- shifted_graphs.arrange_submobjects, DOWN,
+ shifted_graphs.arrange, DOWN,
shifted_graphs.move_to, fourier_graph, DOWN,
)
self.wait()
@@ -3100,7 +3100,7 @@ class ShowMomentumFormula(IntroduceDeBroglie, TeacherStudentsScene):
for x in range(n_v_lines)
])
v_lines.match_color(xi)
- v_lines.arrange_submobjects(
+ v_lines.arrange(
RIGHT,
buff = float(axes.x_axis.unit_size)/self.default_wave_frequency
)
@@ -3262,7 +3262,7 @@ class AskPhysicists(PiCreatureScene):
PiCreature(color = c).flip()
for c in (GREY, LIGHT_GREY, DARK_GREY)
])
- physies.arrange_submobjects(RIGHT, buff = MED_SMALL_BUFF)
+ physies.arrange(RIGHT, buff = MED_SMALL_BUFF)
physies.scale(scale_factor)
physies.to_corner(DOWN+RIGHT)
@@ -4177,7 +4177,7 @@ class OneLevelDeeper(Scene):
wave_words = TextMobject("Interpretation of the wave function")
arrow = Vector(UP)
group = VGroup(hup_words, arrow, wave_words)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
randomness = ProbabalisticMobjectCloud(
TextMobject("Randomness"),
@@ -4320,7 +4320,7 @@ class ThinkOfHeisenbergUncertainty(PiCreatureScene):
for m1, m2 in (position, momentum), (time, frequency):
arrow = TexMobject("\\updownarrow").scale(1.5)
group = VGroup(m1, arrow, m2)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
lp, rp = parens = TexMobject("\\big(\\big)")
parens.stretch(1.5, 1)
parens.match_height(group)
@@ -4330,7 +4330,7 @@ class ThinkOfHeisenbergUncertainty(PiCreatureScene):
groups.add(group)
arrow = TexMobject("\\Leftrightarrow").scale(2)
groups.submobjects.insert(1, arrow)
- groups.arrange_submobjects(RIGHT)
+ groups.arrange(RIGHT)
groups.next_to(morty, UP+RIGHT, LARGE_BUFF)
groups.shift_onto_screen()
@@ -4691,7 +4691,7 @@ class Thumbnail(Scene):
axes.get_graph(get_func(a))
for a in (10, 3, 1, 0.3, 0.1,)
])
- graphs.arrange_submobjects(DOWN, buff = 0.6)
+ graphs.arrange(DOWN, buff = 0.6)
graphs.to_corner(UP+LEFT)
graphs.set_color_by_gradient(BLUE_B, BLUE_D)
diff --git a/old_projects/wallis.py b/old_projects/wallis.py
index 37ad09cbf..35c6ad382 100644
--- a/old_projects/wallis.py
+++ b/old_projects/wallis.py
@@ -180,7 +180,7 @@ class TableOfContents(Scene):
dot = Dot(color=BLUE)
dot.next_to(topic, LEFT)
topic.add(dot)
- topics.arrange_submobjects(
+ topics.arrange(
DOWN, aligned_edge=LEFT, buff=LARGE_BUFF
)
self.add(topics)
@@ -481,7 +481,7 @@ class ShowProduct(Scene):
smaller_parts.set_color(BLUE)
for parts in larger_parts, smaller_parts:
- parts.arrange_submobjects(RIGHT, buff=2 * SMALL_BUFF)
+ parts.arrange(RIGHT, buff=2 * SMALL_BUFF)
# Move around the dots
for part1, part2 in zip(parts, parts[1:]):
dot = part1.submobjects.pop(-1)
@@ -644,7 +644,7 @@ class ShowProduct(Scene):
dot.match_color(part)
dot.next_to(part, vect, buff=2 * SMALL_BUFF)
part.add(dot)
- full_product.arrange_submobjects(RIGHT, buff=2 * SMALL_BUFF)
+ full_product.arrange(RIGHT, buff=2 * SMALL_BUFF)
full_product.to_edge(UP)
for parts in larger_parts, smaller_parts:
@@ -934,7 +934,7 @@ class DistanceProductScene(MovingCameraScene):
for label in stacked_labels:
label.rotate(-label.angle)
label.set_height(self.numeric_distance_label_height)
- stacked_labels.arrange_submobjects(DOWN)
+ stacked_labels.arrange(DOWN)
stacked_labels.move_to(column_top, UP)
h_line = Line(LEFT, RIGHT)
@@ -1241,7 +1241,7 @@ class IntroduceDistanceProduct(DistanceProductScene):
self.wait()
self.play(
FadeOut(plusses),
- d_terms.arrange_submobjects, RIGHT, 0.25 * SMALL_BUFF,
+ d_terms.arrange, RIGHT, 0.25 * SMALL_BUFF,
d_terms.move_to, sum_of_inverse_squares, DOWN,
)
self.wait()
@@ -1590,7 +1590,7 @@ class FromGeometryToAlgebra(DistanceProductScene):
algebraic_words = TextMobject("Algebraic property")
algebraic_words.add_background_rectangle()
word_group = VGroup(geometric_words.target, arrow, algebraic_words)
- word_group.arrange_submobjects(RIGHT)
+ word_group.arrange(RIGHT)
word_group.move_to(origin)
word_group.to_edge(UP)
@@ -2587,7 +2587,7 @@ class DistanceProductIsChordF(PlugObserverIntoPolynomial):
)
fraction_words.scale(0.8)
fraction_words[0][0].set_color(YELLOW)
- fraction_words.arrange_submobjects(DOWN, SMALL_BUFF, aligned_edge=LEFT)
+ fraction_words.arrange(DOWN, SMALL_BUFF, aligned_edge=LEFT)
fraction_words.next_to(O_dot.label, RIGHT)
list(map(TexMobject.add_background_rectangle, fraction_words))
@@ -2850,7 +2850,7 @@ class ProveLemma2(PlugObserverIntoPolynomial):
FadeIn(new_lhs_background),
polynomial_background.stretch, 0.8, 0,
polynomial_background.move_to, frac_line_copy, LEFT,
- equals_remaining_factors.arrange_submobjects, RIGHT, SMALL_BUFF,
+ equals_remaining_factors.arrange, RIGHT, SMALL_BUFF,
equals_remaining_factors.next_to, frac_line_copy, RIGHT, MED_SMALL_BUFF,
ReplacementTransform(first_factor, O_minus_1,
path_arc=-90 * DEGREES),
@@ -3223,7 +3223,7 @@ class KeeperAndSailor(DistanceProductScene, PiCreatureScene):
part.generate_target()
div = TexMobject("/")
first_denom = VGroup(two.target, div, dist)
- first_denom.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ first_denom.arrange(RIGHT, buff=SMALL_BUFF)
first_denom.move_to(two, UP)
N.next_to(frac_line, UP, SMALL_BUFF)
@@ -3713,7 +3713,7 @@ class KeeperAndSailor(DistanceProductScene, PiCreatureScene):
final_dot = TexMobject("\\cdots")
for group in wallis_product, dots:
group.submobjects[-1] = final_dot
- wallis_product.arrange_submobjects(RIGHT, buff=MED_SMALL_BUFF)
+ wallis_product.arrange(RIGHT, buff=MED_SMALL_BUFF)
wallis_product.to_edge(RIGHT)
self.play(
@@ -4094,7 +4094,7 @@ class HowThisArgumentRequiresCommunitingLimits(PiCreatureScene):
)
top_line = VGroup(factors, equals, result)
- top_line.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ top_line.arrange(RIGHT, buff=SMALL_BUFF)
result.shift(SMALL_BUFF * UP)
top_line.scale(scale_val)
top_line.to_edge(UP)
@@ -4254,7 +4254,7 @@ class HowThisArgumentRequiresCommunitingLimits(PiCreatureScene):
def create_pi_creatures(self):
group = VGroup(PiCreature(color=GREY), Mortimer())
group.set_height(2)
- group.arrange_submobjects(RIGHT, buff=4)
+ group.arrange(RIGHT, buff=4)
group.to_edge(DOWN)
return group
@@ -4476,7 +4476,7 @@ class DelicacyInIntermixingSeries(Scene):
for mover in movers1:
mover.generate_target()
new_product.add(mover.target)
- new_product.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ new_product.arrange(RIGHT, buff=SMALL_BUFF)
new_product.next_to(h_line, DOWN, LARGE_BUFF, aligned_edge=LEFT)
new_arrow = top_product.arrow.copy()
@@ -4505,7 +4505,7 @@ class DelicacyInIntermixingSeries(Scene):
final_dot = mover.final_position[-1][0]
mover.final_position.submobjects[-1] = final_dot
final_product.add(mover.final_position)
- final_product.arrange_submobjects(RIGHT, buff=SMALL_BUFF)
+ final_product.arrange(RIGHT, buff=SMALL_BUFF)
final_product.move_to(new_product, RIGHT)
self.play(
@@ -4688,7 +4688,7 @@ class KeeperAndSailorForSineProduct(KeeperAndSailor):
]
group = VGroup(arrow1, frac1, arrow2, frac2)
- group.arrange_submobjects(DOWN)
+ group.arrange(DOWN)
group.next_to(self.result_fraction, DOWN)
big_group = VGroup(self.result_fraction, *group)
@@ -4857,7 +4857,7 @@ class KeeperAndSailorForSineProduct(KeeperAndSailor):
self.play(FadeOut(chord_f))
self.wait()
self.play(
- f_pi.arrange_submobjects, RIGHT, {"buff": SMALL_BUFF},
+ f_pi.arrange, RIGHT, {"buff": SMALL_BUFF},
f_pi.next_to, over, UP, SMALL_BUFF,
FadeOut(dot_two),
FadeOut(two_sine_f_pi[0]),
@@ -4937,7 +4937,7 @@ class KeeperAndSailorForSineProduct(KeeperAndSailor):
PiCreature(color=BLUE_D),
Mortimer()
)
- pi_creatures.arrange_submobjects(RIGHT, LARGE_BUFF)
+ pi_creatures.arrange(RIGHT, LARGE_BUFF)
pi_creatures.set_height(1)
pi_creatures.next_to(rect, DOWN)
for pi in pi_creatures:
diff --git a/old_projects/waves.py b/old_projects/waves.py
index 405c7b5fe..b1a4db58a 100644
--- a/old_projects/waves.py
+++ b/old_projects/waves.py
@@ -945,7 +945,7 @@ class WriteCurlEquations(Scene):
"\\frac{\\partial \\textbf{E}}{\\partial t}"
)
eqs = VGroup(eq1, eq2)
- eqs.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ eqs.arrange(DOWN, buff = LARGE_BUFF)
eqs.set_height(FRAME_HEIGHT - 1)
eqs.to_edge(LEFT)
for eq in eqs:
@@ -1014,7 +1014,7 @@ class ListRelevantWaveIdeas(TeacherStudentsScene):
"- How phase influences addition",
])))
topics.scale(0.8)
- topics.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ topics.arrange(DOWN, aligned_edge = LEFT)
topics.next_to(h_line, DOWN, aligned_edge = LEFT)
quantum = TextMobject("Quantum")
@@ -1167,7 +1167,7 @@ class ShowVectorEquation(Scene):
TexMobject("\\cos(", "2\\pi", "f_x", "t", "+ ", "\\phi_x", ")"),
TexMobject("0", "")
)
- components.arrange_submobjects(DOWN)
+ components.arrange(DOWN)
lb, rb = brackets = TexMobject("[]")
brackets.set_height(components.get_height() + SMALL_BUFF)
lb.next_to(components, LEFT, buff = 0.3)
@@ -1437,7 +1437,7 @@ class ShowVectorEquation(Scene):
x.target, right_ket, plus,
y.target, up_ket,
)
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
E_equals.target.shift(SMALL_BUFF*UP)
group.scale(0.8)
group.move_to(self.brackets, DOWN)
@@ -1497,7 +1497,7 @@ class ShowVectorEquation(Scene):
movers = x, x_ket, plus, y, y_ket
group = VGroup(*[m.target for m in movers])
- group.arrange_submobjects(RIGHT)
+ group.arrange(RIGHT)
group.move_to(x, LEFT)
vector_A_vect = np.array(self.oscillating_vector.A_vect)
@@ -1672,7 +1672,7 @@ class ShowTipToTailSum(ShowVectorEquation):
ket.generate_target()
plus = TexMobject("+")
ket_sum = VGroup(h_ket.target, plus, v_ket.target)
- ket_sum.arrange_submobjects(RIGHT)
+ ket_sum.arrange(RIGHT)
ket_sum.next_to(3*RIGHT + 2*UP, UP, SMALL_BUFF)
self.wait(4)
diff --git a/old_projects/wcat.py b/old_projects/wcat.py
index 638745e22..a88ade667 100644
--- a/old_projects/wcat.py
+++ b/old_projects/wcat.py
@@ -378,7 +378,7 @@ class WhenIWasAKid(TeacherStudentsScene):
BabyPiCreature(color = color)
for color in colors
])
- children.arrange_submobjects(RIGHT)
+ children.arrange(RIGHT)
children.to_edge(DOWN, buff = LARGE_BUFF)
children.to_edge(LEFT)
return children
@@ -629,7 +629,7 @@ class PairOfPairBecomeRectangle(Scene):
"$\\Downarrow$",
"Rectangle",
])))
- words.arrange_submobjects(DOWN)
+ words.arrange(DOWN)
words.to_edge(RIGHT)
words[-1].set_color(BLUE)
@@ -1075,7 +1075,7 @@ class RepresentPairInUnitSquare(ClosedLoopScene):
TexMobject("\\Downarrow"),
TextMobject("Point in \\\\ unit square")
])
- right_words.arrange_submobjects(DOWN)
+ right_words.arrange(DOWN)
right_words.to_edge(RIGHT)
dot_coords = (0.3, 0.7)
@@ -1954,7 +1954,7 @@ class PatreonThanks(Scene):
self.specific_patrons[n_patrons/2:]
)))
for patrons, vect in (left_patrons, LEFT), (right_patrons, RIGHT):
- patrons.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ patrons.arrange(DOWN, aligned_edge = LEFT)
patrons.next_to(special_thanks, DOWN)
patrons.to_edge(vect, buff = LARGE_BUFF)
@@ -2032,7 +2032,7 @@ class CreditThree(Scene):
"buymywidgets.com",
"learnwhatilearn.com",
])))
- domains.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ domains.arrange(DOWN, aligned_edge = LEFT)
domains.next_to(randy, UP, buff = LARGE_BUFF)
domains.shift_onto_screen()
diff --git a/old_projects/zeta.py b/old_projects/zeta.py
index 030fd127a..f36462a25 100644
--- a/old_projects/zeta.py
+++ b/old_projects/zeta.py
@@ -177,7 +177,7 @@ class IntroduceZeta(ZetaTransformationScene):
TexMobject("\\zeta(s) = "),
TexMobject("\\sum_{n=1}^\\infty \\frac{1}{n^s}")
)
- func_mob.arrange_submobjects(RIGHT, buff = 0)
+ func_mob.arrange(RIGHT, buff = 0)
for submob in func_mob:
submob.add_background_rectangle()
func_mob.next_to(title, DOWN)
@@ -217,12 +217,12 @@ class WhyPeopleMayKnowIt(TeacherStudentsScene):
TexMobject("\\$1{,}000{,}000").set_color_by_gradient(GREEN_B, GREEN_D),
TexMobject("\\zeta(s) = 0")
)
- mercenary_thought.arrange_submobjects(DOWN)
+ mercenary_thought.arrange(DOWN)
divergent_sum = VGroup(
TexMobject("1+2+3+4+\\cdots = -\\frac{1}{12}"),
TexMobject("\\zeta(-1) = -\\frac{1}{12}")
)
- divergent_sum.arrange_submobjects(DOWN)
+ divergent_sum.arrange(DOWN)
divergent_sum[0].set_color_by_gradient(YELLOW, MAROON_B)
divergent_sum[1].set_color(BLACK)
@@ -372,7 +372,7 @@ class AssumeKnowledgeOfComplexNumbers(ComplexTransformationScene):
TextMobject("2) How to work with them."),
TextMobject("3) Maybe derivatives?"),
)
- text.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ text.arrange(DOWN, aligned_edge = LEFT)
for words in text:
words.add_background_rectangle()
text[0].shift(LEFT)
@@ -1917,8 +1917,8 @@ class ShowConditionalDefinition(Scene):
for s in (">", "\\le")
])
definitions = VGroup(sigma, something_else)
- definitions.arrange_submobjects(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
- conditions.arrange_submobjects(DOWN, buff = LARGE_BUFF)
+ definitions.arrange(DOWN, buff = MED_LARGE_BUFF, aligned_edge = LEFT)
+ conditions.arrange(DOWN, buff = LARGE_BUFF)
definitions.shift(2*LEFT+2*UP)
conditions.next_to(definitions, RIGHT, buff = LARGE_BUFF, aligned_edge = DOWN)
brace = Brace(definitions, LEFT)
@@ -3172,7 +3172,7 @@ class PatreonThanks(Scene):
self.specific_patrons[n_patrons/2:]
)))
for patrons, vect in (left_patrons, LEFT), (right_patrons, RIGHT):
- patrons.arrange_submobjects(DOWN, aligned_edge = LEFT)
+ patrons.arrange(DOWN, aligned_edge = LEFT)
patrons.next_to(special_thanks, DOWN)
patrons.to_edge(vect, buff = LARGE_BUFF)