Skip to content
Advertisement

Tag: animation

Plot don’t refresh when slider updated matplotlib

I can’t figure out why the plot don’t refresh when the slider is updated. I’m using Jupiter notebook and I choose the backend with ‘nbAgg’ parameter. Initialization code : There is a animation which lunch this function : The animation : Here the slider which stuck me : This below function don’t work as expected : Answer You can try

Writing a function that draws a cube. I can’t manage to make a full cube, just the y axis cube (more info in text)

as the title says, I want to make a program for school that draws rubiks cube. Essentially, user enters size of cube (3×3, 4×4, …) and the program reads the first number of the entered size. So if user writes 3×3, program will read the number ‘3’ at the beginning. From there, the program will run y = canvas.create_polygon(100,cube_y,200,cube_y,200,cube_y2,100,cube_y2, fill

Animating two circles Python

I have a text file, with the coordinates of two circles on it. I want to produce a live animation of both particles. For some reason the following code crashes The text file that the data is taken from has the columns of X1, Y1, X2 and Y2 where X1 represents the x coordinate of the 1st particle etc. If

Matplotlib FuncAnimation Created twice – duplicate when embbeded in tkinter

I have a troubleing bug that i just could not understands it’s origin. Several days of attempts and still no luck. I’m trying to create a line cursor that correspond to played audio with FuncAnimation and for some reason, the animation is created twice ONLY when the callback (line_select_callback) that activates the function is triggered from RectangleSelector widget after drawing

Advertisement