Rename substrings_to_isolate -> isolate

This commit is contained in:
Grant Sanderson 2021-01-07 12:12:19 -08:00
parent 3cc74ee56a
commit b6869b8ce4
7 changed files with 14 additions and 14 deletions

View file

@ -16,7 +16,7 @@ def apply_function_to_points(point_func, mobject):
def get_nested_one_plus_one_over_x(n_terms, bottom_term="x"):
tex = "1+ {1 \\over" * n_terms + bottom_term + "}" * n_terms
return TexMobject(tex, substrings_to_isolate=["1", "\\over", bottom_term])
return TexMobject(tex, isolate=["1", "\\over", bottom_term])
def get_phi_continued_fraction(n_terms):

View file

@ -2963,7 +2963,7 @@ class PhaseSpaceOfPopulationModel(ShowTwoPopulations, PiCreatureScene, MovingCam
dot = Dot(point)
coord_pair = TexMobject(
"(10, 10)", substrings_to_isolate=["10"]
"(10, 10)", isolate=["10"]
)
pop_sizes = VGroup(Integer(10), Integer(10))
pop_sizes[0].set_color(GREY_B)
@ -3174,7 +3174,7 @@ class PhaseSpaceOfPopulationModel(ShowTwoPopulations, PiCreatureScene, MovingCam
{dYY \\over dt} =
YY \\cdot (\\delta X - \\gamma)
""",
substrings_to_isolate=variables
isolate=variables
)
animals = [self.get_rabbit(), self.get_fox().flip()]
for char, animal in zip(variables, animals):
@ -3770,7 +3770,7 @@ class DivergenceTinyNudgesView(MovingCameraScene):
substrings = ["Step", "Difference"]
dot_product = TextMobject(
"(Step) $\\cdot$ (Difference)",
substrings_to_isolate=substrings,
isolate=substrings,
arg_separator="",
).scale(sf)
group = VGroup(div_text, dot_product)

View file

@ -20,7 +20,7 @@ def get_bayes_formula():
"A": YELLOW,
"B": BLUE,
},
substrings_to_isolate=list("P(|)")
isolate=list("P(|)")
)
@ -677,7 +677,7 @@ class TemptingFormula(ShowTwoPerspectives, RandomnessVsProportions):
# Show venn diagram
kw = {
"tex_to_color_map": TEX_TO_COLOR_MAP,
"substrings_to_isolate": list("P()"),
"isolate": list("P()"),
}
formula = VGroup(
TexMobject("P(A \\text{ and } B)", **kw),
@ -1017,7 +1017,7 @@ class DiseaseBayes(Scene):
"D": YELLOW,
"+": BLUE,
},
substrings_to_isolate=list("P(|)=")
isolate=list("P(|)=")
)
formula.scale(2.5)

View file

@ -20,7 +20,7 @@ def get_bayes_formula(expand_denominator=False):
"{\\neg H}": NOT_HYPOTHESIS_COLOR,
"{E}": EVIDENCE_COLOR1,
}
substrings_to_isolate = ["P", "\\over", "=", "\\cdot", "+"]
isolate = ["P", "\\over", "=", "\\cdot", "+"]
tex = "P({H} | {E}) = {P({H}) P({E} | {H}) \\over "
if expand_denominator:
@ -31,7 +31,7 @@ def get_bayes_formula(expand_denominator=False):
formula = TexMobject(
tex,
tex_to_color_map=t2c,
substrings_to_isolate=substrings_to_isolate,
isolate=isolate,
)
formula.posterior = formula[:6]
@ -4184,7 +4184,7 @@ class GlimpseOfNextVideo(GraphScene):
"H": HYPOTHESIS_COLOR,
"E": EVIDENCE_COLOR1,
},
substrings_to_isolate=list("p(|)")
isolate=list("p(|)")
)
formula.move_to(self.formula_position)
return formula
@ -4558,7 +4558,7 @@ class MassOfEarthEstimates(GlimpseOfNextVideo):
"M": HYPOTHESIS_COLOR,
"\\text{data}": EVIDENCE_COLOR1,
},
substrings_to_isolate=list("p(|)")
isolate=list("p(|)")
)
formula.move_to(self.formula_position)
return formula

View file

@ -83,7 +83,7 @@ class StrogatzQuote(Scene):
""" + author,
alignment="",
arg_separator=" ",
substrings_to_isolate=[law_words, language_words, author]
isolate=[law_words, language_words, author]
)
quote.law_part = quote.get_part_by_tex(law_words)
quote.language_part = quote.get_part_by_tex(language_words)

View file

@ -3704,7 +3704,7 @@ class TerryTaoQuote(Scene):
""",
alignment="",
arg_separator=" ",
substrings_to_isolate=[story_words]
isolate=[story_words]
)
quote.story_part = quote.get_part_by_tex(story_words)
quote.set_width(FRAME_WIDTH - 2.5)

View file

@ -5820,7 +5820,7 @@ class DisambiguateFPR(Scene):
# Add title
title = TextMobject(
"1\\% False Positive Rate",
substrings_to_isolate=["F", "P", "R"],
isolate=["F", "P", "R"],
font_size=72
)
title.to_edge(UP)