Animate Multiple Shapes In Python3 Using Matplotlib
Trying to animate multiple objects at once in python3 while using matplotlib animation function. code written below is where I am thus far. I am able to create the multiple objects
Solution 1:
You have to use
RB[i].set_xy(temp)
instead of set_XY = temp
Solution 2:
The indexes in RB is wrong actually. You should change the animate function as:
def animate(i):
for a in range(bars):
temp = RB[a].get_x() + 3
RB[a].set_x(temp)
return RB
Post a Comment for "Animate Multiple Shapes In Python3 Using Matplotlib"