Code
from manim import *
import numpy as np
import math as math
class MaclaurinSine(MovingCameraScene):
def construct(self):
self.camera.frame.scale(0.5)
coords = NumberPlane()
L = []
def next_graph (n,x):
f = math.fsum([(((-1)**m)*(x**(2*m+1))/(math.factorial(2*m+1))) for m in range(n)])
return f
graph_basic = coords.get_graph(lambda x:next_graph(0,x),x_range=[-17,17])
self.add(graph_basic)
for i in range(1,20):
graph1 = coords.get_graph(lambda x:next_graph(i,x),x_range=[-17,17])
a = ReplacementTransform(Group(*self.mobjects),graph1,run_time = 0.2)
L.append(a)
self.play(Succession(*[x for x in L],lag_ratio=1),self.camera.frame.animate.scale(3))
self.wait(3)
The problem
This code works as expected except that there is one little problem after the scene is rendered the scene ends with an annoying frame (apparently, this frame is the sum of the animations applied to some graph).
What I tried
I tried to use LaggedStart instead of Succession and tried to use methods like interpolate but (as I am still learning) I got errors that I couldn't fix.
I don't know where the problem is rather than how to fix it. so how to get rid of this last frame (in a way that enables me to continue adding animations after this animation with no gaps between the animations)
note: I am still learning this beautiful library so there are some ideas still tricky for me.
Thanks in advance.

