This tag is for questions related to the matplotlib animation API
Questions tagged [matplotlib-animation]
383 questions
0
votes
1 answer
Matplotlib animation: update axis ticks in pcolormesh
I'm creating an animation of an image with axis values varying over time.
All_data is a matrix that contains in one axe time frames inside there are 3 quatities which are longitude latitude and pixel values
so
lon = All_data[0,0] #-> lon is a 2D nxm…

slimguat
- 45
- 5
0
votes
1 answer
I need some help on making an animated plot
I have an array x_trj that has shape (50,12), and I would like to make an animation for all the rows corresponding to certain columns in a 2-D plot (so I can see what direction each line is going). Below is my code:
from matplotlib.animation import…

Randy Chen
- 107
- 8
0
votes
1 answer
Update the color of current rectangle in matplot animation
I want to animate the Bubble Sort algorithm with FuncAnimationfrom matplotlib. My idea is to generate a random list of integers and initialize a bar chart plot with the values. Then I apply the update_fig function with the generator values for my…

adama
- 537
- 2
- 10
- 29
0
votes
1 answer
Moving sphere animation
I want to create an animation of a moving sphere in matplotlib. For some reason it isnt working:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from matplotlib import cm
from matplotlib import animation
import…

Tom
- 55
- 1
- 6
0
votes
1 answer
Matplotlib not plotting anything
I am trying to animate a figure with 3 subplots for some data from a tensor log. I've made generator and animation functions which appear to yield the correct data, however when I do plt.show(), nothing shows on the plot, and when I try to save as…

scrungal
- 13
- 3
0
votes
0 answers
Why do I get an error when running this example code?
I tried to run the example code from following site in Python 3.8:
https://www.demo2s.com/python/python-matplotlib-animation-animate-decay.html
However, I get the following…

Riemann
- 158
- 10
0
votes
1 answer
how to iterate on the color in matplotlib in a multiple plot animation
i am trying to plot an current-voltage acquisition from an instrument but for different temperatures. I need to keep the structure as presented but i would like to have for each temperature get the plot in 1 uniform color then for the next…

datac
- 39
- 7
0
votes
1 answer
Cleaning background in Matplotlib stackplot animation
I have a basic animation with a basic line plot, aka ax.plot(...). I modified it so it produces a stackplot instead of the lineplot (code snippet below).
Problem is the the plot doesn't seem to clean the background with every iteration anymore. You…

ateymour
- 199
- 3
- 11
0
votes
1 answer
Can someone help me write an animation function for this python code?
I am trying to learn how to animate this graph that calculates the integral of a function using the montecarlo method but to no success. I don't have much understanding of python, this is my first code besides learning some language basics a few…

Youssef Badr
- 3
- 2
0
votes
1 answer
How to plot data stream in 3D
Program Description: I have a phone sending gyroscope data every 2 seconds to a server. Every second I retrieve data from the server. The purpose of my program is to read this data stream and make a 3d visualisation with matplotlib which can update…

JoshJohnson
- 181
- 3
- 18
0
votes
0 answers
Animate a predefined list in with matplotlib with known timestep
I generated two location lists (x and y coordinates).
Now I want to animate the movement(changing x and y) element after element.
The FuncAnimation function of matplotlib seems not to work. The animate(i) function usually uses the timedependent…

oelbaron
- 1
0
votes
1 answer
Not able to animate using Funcanimation
I am using code from geekforgeek and copying it to jupyternotebook.
from matplotlib import pyplot as plt
from matplotlib.animation import FuncAnimation, writers
import numpy as np
fig = plt.figure(figsize = (7,5))
axes =…
0
votes
0 answers
Backtrder animated plotting
Im looking for a way to animate backtest plotting of the Backtrder. I searched for appropriate tools and I found FuncAnimation:
FuncAnimation(figure, animation_function, frames=None, init_func=None, fargs=None, save_count=None, *,…

teralee
- 11
- 1
0
votes
1 answer
How to animate multiple arrays using matplotlib
I am attempting to show a sort of plot refresh on a sequence of array. Each array is an instance of the sequence and for each of them I want to plot the relative array, plus its smoothed version, like that:
these frames should be showed in sequence…

Foolvio
- 15
- 3
0
votes
1 answer
How to update scatter with plot?
I am updating the graph, but can't join to it the scatter, could someone help me, please? I don't understand, how to realize it.
from matplotlib import pyplot as plt
from matplotlib.animation import FuncAnimation
fig = plt.figure()
ax =…

An Ri
- 406
- 5
- 13