In a recent question of mine , I am quoting some Jake Vanderplas code . You can find the following code:
from matplotlib import pyplot as plt
from matplotlib import animation
fig = plt.figure()
ax = plt.axes(xlim=(0, 2), ylim=(0, 100))
line, = plt.plot([], [])
def init():
line.set_data([], [])
return line,
def animate(i):
line.set_data([0, 2], [0,i])
return line,
anim = animation.FuncAnimation(fig, animate, init_func=init,
frames=100, interval=20, blit=True)
plt.show()
In function initor animatereturn "value" line,(with a comma).
Question: Is there a difference with a return value that would be line(without a comma)?
thank
source
share