mirror of
https://github.com/3b1b/videos.git
synced 2025-08-31 21:58:59 +00:00
Rename substrings_to_isolate -> isolate
This commit is contained in:
parent
3cc74ee56a
commit
b6869b8ce4
7 changed files with 14 additions and 14 deletions
|
@ -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"):
|
def get_nested_one_plus_one_over_x(n_terms, bottom_term="x"):
|
||||||
tex = "1+ {1 \\over" * n_terms + bottom_term + "}" * n_terms
|
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):
|
def get_phi_continued_fraction(n_terms):
|
||||||
|
|
|
@ -2963,7 +2963,7 @@ class PhaseSpaceOfPopulationModel(ShowTwoPopulations, PiCreatureScene, MovingCam
|
||||||
dot = Dot(point)
|
dot = Dot(point)
|
||||||
|
|
||||||
coord_pair = TexMobject(
|
coord_pair = TexMobject(
|
||||||
"(10, 10)", substrings_to_isolate=["10"]
|
"(10, 10)", isolate=["10"]
|
||||||
)
|
)
|
||||||
pop_sizes = VGroup(Integer(10), Integer(10))
|
pop_sizes = VGroup(Integer(10), Integer(10))
|
||||||
pop_sizes[0].set_color(GREY_B)
|
pop_sizes[0].set_color(GREY_B)
|
||||||
|
@ -3174,7 +3174,7 @@ class PhaseSpaceOfPopulationModel(ShowTwoPopulations, PiCreatureScene, MovingCam
|
||||||
{dYY \\over dt} =
|
{dYY \\over dt} =
|
||||||
YY \\cdot (\\delta X - \\gamma)
|
YY \\cdot (\\delta X - \\gamma)
|
||||||
""",
|
""",
|
||||||
substrings_to_isolate=variables
|
isolate=variables
|
||||||
)
|
)
|
||||||
animals = [self.get_rabbit(), self.get_fox().flip()]
|
animals = [self.get_rabbit(), self.get_fox().flip()]
|
||||||
for char, animal in zip(variables, animals):
|
for char, animal in zip(variables, animals):
|
||||||
|
@ -3770,7 +3770,7 @@ class DivergenceTinyNudgesView(MovingCameraScene):
|
||||||
substrings = ["Step", "Difference"]
|
substrings = ["Step", "Difference"]
|
||||||
dot_product = TextMobject(
|
dot_product = TextMobject(
|
||||||
"(Step) $\\cdot$ (Difference)",
|
"(Step) $\\cdot$ (Difference)",
|
||||||
substrings_to_isolate=substrings,
|
isolate=substrings,
|
||||||
arg_separator="",
|
arg_separator="",
|
||||||
).scale(sf)
|
).scale(sf)
|
||||||
group = VGroup(div_text, dot_product)
|
group = VGroup(div_text, dot_product)
|
||||||
|
|
|
@ -20,7 +20,7 @@ def get_bayes_formula():
|
||||||
"A": YELLOW,
|
"A": YELLOW,
|
||||||
"B": BLUE,
|
"B": BLUE,
|
||||||
},
|
},
|
||||||
substrings_to_isolate=list("P(|)")
|
isolate=list("P(|)")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ class TemptingFormula(ShowTwoPerspectives, RandomnessVsProportions):
|
||||||
# Show venn diagram
|
# Show venn diagram
|
||||||
kw = {
|
kw = {
|
||||||
"tex_to_color_map": TEX_TO_COLOR_MAP,
|
"tex_to_color_map": TEX_TO_COLOR_MAP,
|
||||||
"substrings_to_isolate": list("P()"),
|
"isolate": list("P()"),
|
||||||
}
|
}
|
||||||
formula = VGroup(
|
formula = VGroup(
|
||||||
TexMobject("P(A \\text{ and } B)", **kw),
|
TexMobject("P(A \\text{ and } B)", **kw),
|
||||||
|
@ -1017,7 +1017,7 @@ class DiseaseBayes(Scene):
|
||||||
"D": YELLOW,
|
"D": YELLOW,
|
||||||
"+": BLUE,
|
"+": BLUE,
|
||||||
},
|
},
|
||||||
substrings_to_isolate=list("P(|)=")
|
isolate=list("P(|)=")
|
||||||
)
|
)
|
||||||
formula.scale(2.5)
|
formula.scale(2.5)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ def get_bayes_formula(expand_denominator=False):
|
||||||
"{\\neg H}": NOT_HYPOTHESIS_COLOR,
|
"{\\neg H}": NOT_HYPOTHESIS_COLOR,
|
||||||
"{E}": EVIDENCE_COLOR1,
|
"{E}": EVIDENCE_COLOR1,
|
||||||
}
|
}
|
||||||
substrings_to_isolate = ["P", "\\over", "=", "\\cdot", "+"]
|
isolate = ["P", "\\over", "=", "\\cdot", "+"]
|
||||||
|
|
||||||
tex = "P({H} | {E}) = {P({H}) P({E} | {H}) \\over "
|
tex = "P({H} | {E}) = {P({H}) P({E} | {H}) \\over "
|
||||||
if expand_denominator:
|
if expand_denominator:
|
||||||
|
@ -31,7 +31,7 @@ def get_bayes_formula(expand_denominator=False):
|
||||||
formula = TexMobject(
|
formula = TexMobject(
|
||||||
tex,
|
tex,
|
||||||
tex_to_color_map=t2c,
|
tex_to_color_map=t2c,
|
||||||
substrings_to_isolate=substrings_to_isolate,
|
isolate=isolate,
|
||||||
)
|
)
|
||||||
|
|
||||||
formula.posterior = formula[:6]
|
formula.posterior = formula[:6]
|
||||||
|
@ -4184,7 +4184,7 @@ class GlimpseOfNextVideo(GraphScene):
|
||||||
"H": HYPOTHESIS_COLOR,
|
"H": HYPOTHESIS_COLOR,
|
||||||
"E": EVIDENCE_COLOR1,
|
"E": EVIDENCE_COLOR1,
|
||||||
},
|
},
|
||||||
substrings_to_isolate=list("p(|)")
|
isolate=list("p(|)")
|
||||||
)
|
)
|
||||||
formula.move_to(self.formula_position)
|
formula.move_to(self.formula_position)
|
||||||
return formula
|
return formula
|
||||||
|
@ -4558,7 +4558,7 @@ class MassOfEarthEstimates(GlimpseOfNextVideo):
|
||||||
"M": HYPOTHESIS_COLOR,
|
"M": HYPOTHESIS_COLOR,
|
||||||
"\\text{data}": EVIDENCE_COLOR1,
|
"\\text{data}": EVIDENCE_COLOR1,
|
||||||
},
|
},
|
||||||
substrings_to_isolate=list("p(|)")
|
isolate=list("p(|)")
|
||||||
)
|
)
|
||||||
formula.move_to(self.formula_position)
|
formula.move_to(self.formula_position)
|
||||||
return formula
|
return formula
|
||||||
|
|
|
@ -83,7 +83,7 @@ class StrogatzQuote(Scene):
|
||||||
""" + author,
|
""" + author,
|
||||||
alignment="",
|
alignment="",
|
||||||
arg_separator=" ",
|
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.law_part = quote.get_part_by_tex(law_words)
|
||||||
quote.language_part = quote.get_part_by_tex(language_words)
|
quote.language_part = quote.get_part_by_tex(language_words)
|
||||||
|
|
|
@ -3704,7 +3704,7 @@ class TerryTaoQuote(Scene):
|
||||||
""",
|
""",
|
||||||
alignment="",
|
alignment="",
|
||||||
arg_separator=" ",
|
arg_separator=" ",
|
||||||
substrings_to_isolate=[story_words]
|
isolate=[story_words]
|
||||||
)
|
)
|
||||||
quote.story_part = quote.get_part_by_tex(story_words)
|
quote.story_part = quote.get_part_by_tex(story_words)
|
||||||
quote.set_width(FRAME_WIDTH - 2.5)
|
quote.set_width(FRAME_WIDTH - 2.5)
|
||||||
|
|
|
@ -5820,7 +5820,7 @@ class DisambiguateFPR(Scene):
|
||||||
# Add title
|
# Add title
|
||||||
title = TextMobject(
|
title = TextMobject(
|
||||||
"1\\% False Positive Rate",
|
"1\\% False Positive Rate",
|
||||||
substrings_to_isolate=["F", "P", "R"],
|
isolate=["F", "P", "R"],
|
||||||
font_size=72
|
font_size=72
|
||||||
)
|
)
|
||||||
title.to_edge(UP)
|
title.to_edge(UP)
|
||||||
|
|
Loading…
Add table
Reference in a new issue