I am new to python, and I am working on code that displays the ball at the timestamps on a graph. I want to use interactive widget to display how the ball moves on the graph.
def f(x):
return matplotlib.pyplot.plot(ball.posx[x],ball.posy[x],'bo', markersize=5) #displaying current
interactive(f, x=5);
however, I get this error message:
interactive() got an unexpected keyword argument 'x'
But this is what it said in the documentation. How can I fix this? Thanks
added line: from ipywidgets import interact, interactive->interact