This tag is for questions related to the matplotlib animation API
Questions tagged [matplotlib-animation]
383 questions
2
votes
2 answers
How to use matplotlib to animate bubble plot along with years
The following dataset needs to be animated with years as a bubble plot. With the year, Life Expectancy(X-Axis) and GDP(Y-Axis) need to be changed.
df.head()
Following Image for the Year of 1960 :
Following Image for Year 1961 :
My requirement is…

viththi
- 161
- 3
- 9
2
votes
0 answers
Matplotlib Animation requires an extreme amount of time to run
I'm working on a fairly simple matplotlib animation using animation.FuncAnimation and it takes a very long time to run; about 0.81s per frame and 180s for the 220 frames in an 11 second long video. I've already incorporated the standard performance…

bcaddy
- 73
- 5
2
votes
2 answers
Matplotlib animation not displaying correctly in Colab
I know there are previous answers to this question but for some reason I cannot seem to get the animation to show. Instead all the frames of the animation are overlayed in a figure that appears below the blank animation
from matplotlib import…

Dan Nedelescu
- 23
- 2
2
votes
1 answer
Matplotlib (or mplfinance) two animation.FuncAnimation with different intervals
In python matplotlib finance
Is it possible to have two different figures with animation.FuncAnimation in mplfinance where one has 12 axis with different style and another figure has two planes one for bar and another for volume.
Another reason is…

Sunil Gupta
- 21
- 2
2
votes
0 answers
Plotting an algorithm with interactive figure in Python
I want to visualise the effect of an algorithm that takes a 2d vector as input and delivers an array of 2d vectors as output (where the array has the k-th iteration value at index k).
The way I would like this to work is by having a 2d plot of a…

lpnorm
- 459
- 3
- 10
2
votes
2 answers
Surface animation and saving with matplotlib
I tried to do a very simple animation and save it with matplotlib, but without success. I want for example to see something oscillating: here the best I could do
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import…

Rob Tan
- 159
- 9
2
votes
0 answers
Python Matplotlib Funcanimation issue: struggle to animate a contour plot (contourf) within functions
I'm struggling with FuncAnimation in matplotlib.animation, and I could not find out any examples or post looking similar to my problem (I mean, yes there is post concerning contourf used in funcAnimation but in those posts they succeed to delete the…

MD4
- 19
- 1
2
votes
2 answers
How to use line.set_data for data that is a 2 dimensional array in matplotlib?
I am trying to animate multiple lines at once in matplotlib. To do this I am following the tutorial from the matplotlib.animation docs:
https://matplotlib.org/stable/api/animation_api.html
The idea in this tutorial is to create a line ln, =…

lmms
- 45
- 1
- 1
- 6
2
votes
0 answers
Parallelize matplotlib.animation when running .to_html5_video()
I was wondering whether there is a straight-forward way to parallelize the method animation.FuncAnimation.to_html5_video() which takes a lot of time. While running it only uses 1 of my cpu's cores at a given time and I am guessing the process should…

shnnnms
- 31
- 3
2
votes
0 answers
how to plot arrows to point to cells inside a table in matplot
I want to achieve something like this:
needleman matrix
I have tried to plot an arrow using this function:
plt.arrow(0.02, -0.02, -0.002, 0.002, width=0.0005)
but the problem is that when the table gets bigger, its position change with respect to…

Joe-Thom
- 21
- 2
2
votes
1 answer
Why is matplotlib.animation.FuncAnimation producing a blank ouput in a Jupyter notebook?
I'm learning Python's matplotlib FuncAnimation method but can't get a basic Bayesian conjugates animation to run. When I run this, I just get a blank output in my Jupyter notebook. I also get same result using Google Colab. How do I get animation to…

cona
- 169
- 1
- 13
2
votes
1 answer
Distorted tick labels with matplotlib.animation
With more recent versions of matplotlib I'm getting distorted labels on animated plots. Is anybody else getting this? Am I doing something wrong?
Minimum working example:
from netCDF4 import Dataset
import numpy as np
import matplotlib
import…

Robbie Mallett
- 131
- 1
- 11
2
votes
0 answers
repeat_delay parameter has no effect in animated plot in Jupyter
I am making a simple animated scatter plot in a Jupyter notebook, and I want it to repeat, but with a delay before it loops. This is supposed to be set with the repeat_delay parameter, but it has no effect when I use it in a Jupyter notebook using…

eric
- 7,142
- 12
- 72
- 138
2
votes
1 answer
How do I solve the index error generated in matplotlib animation?
I am learning the animation tool in matplotlib, but I am running into error in the following code.
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import numpy as np
x = np.array([1,2,4,6,4])
y =…

Monojit Sarkar
- 657
- 1
- 5
- 15
2
votes
1 answer
Matplotlib animation
I am trying to create an ABC logo and animate it with matplotlib, I have got all the phases by changing the delta index I am able to get all x and y coordinates but I am not able to animate from one phase to another .below is the link of what I am…

akshay lalwani
- 76
- 8