Fix dot updater in graph example

This commit is contained in:
Grant Sanderson 2024-08-01 07:56:26 -05:00
parent d644e3b184
commit 71814a118b

View file

@ -488,10 +488,7 @@ class GraphExample(Scene):
# with the intent of having other mobjects update based
# on the parameter
x_tracker = ValueTracker(2)
f_always(
dot.move_to,
lambda: axes.i2gp(x_tracker.get_value(), parabola)
)
dot.add_updater(lambda d: d.move_to(axes.i2gp(x_tracker.get_value(), parabola)))
self.play(x_tracker.animate.set_value(4), run_time=3)
self.play(x_tracker.animate.set_value(-2), run_time=3)