Hi,
No, there's no way to see animations in the Plots pane because it's only
able to show static images (png or svg ones).
Cheers,
Carlos
El 20/12/19 a las 12:14 p. m., DrBwts escribió:
Hi,
Just upadated to 4.0 & trying to run the following code..
|
importnumpy asnp
importmath asmt
importrandom
frommatplotlib importpyplot asplt
frommatplotlib importanimation
x =y =0
labx =[0]
laby =[0]
n =100#int(input("number of moves "))
fori inrange(0,n):
x =x +np.cos(float(random.randint(0,360))*(180/(mt.pi)))
y =y +np.sin(float(random.randint(0,360))*(180/(mt.pi)))
labx.append(x)
laby.append(y)
fig =plt.figure()
line,=plt.plot(labx,laby,"o-",lw =2)
definit():
line.set_data([],[])
returnline,
defanimate(n):
line.set_data(labx[:n+1],laby[:n+1])
returnline,
anim =animation.FuncAnimation(fig,animate,init_func
=init,frames=200,interval=20,blit=True)
plt.show()
|
But I just get an empty plot with no animation.
The animation can be seen by using...
|
%matplotlib auto
%matpltlib qt
|
Is there no way of seeing it the plot plane?
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/spyderlib/47ecf7be-7bb5-4c64-b090-2d2bf51ce704%40googlegroups.com
<https://groups.google.com/d/msgid/spyderlib/47ecf7be-7bb5-4c64-b090-2d2bf51ce704%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/spyderlib/9bc43e6b-df38-c742-8f57-da564ec10145%40gmail.com.