-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash of plotted curve should be invalidated when function changes (even if it is wrapped) #3806
Comments
Welcome cooperation to tackle this :) |
I cannot reproduce your problem. I mean the function which you have in your code has not a single visible point within the axes of your scene, neither has your replacement function. When I toggle between class Prove(Scene):
def construct(self):
def f(x):
return (6*x**2+53/x)
axes = Axes(x_range=[-1, 8, 1], y_range=[35, 55, 1], x_length=9, y_length=7)
curve = axes.plot(lambda x: f(x),x_range=[1, 7], color=GREEN)
self.play(
Create(axes),
Create(curve)
)
self.wait() |
Sorry for that I simplified this function while writing this issue; its original formula was: def f(x):
return (3*x**2+53/x)/16 If you change it to: def f(x):
return (9*x**2+53/x)/16 you will see manim use caches in the log. |
Description of bug / unexpected behavior
Caches are used in some inproper situations. Like when I had changed a formula that need to be draw on axes, yet not directly changed the curve's arguments, just an independent function having been changed, manim use the caches.
Expected behavior
In that case, manim should reload the codes.
How to reproduce the issue
Code for reproducing the problem
For example, just change the function f(x) to this:
then render, manim will use the caches.
System specifications
System Details
The text was updated successfully, but these errors were encountered: