This tag is for questions related to the matplotlib animation API
Questions tagged [matplotlib-animation]
383 questions
0
votes
1 answer
How to set Timestamp (pandas Datetime) to xlim of plot with FunctAnimation?
I want to limit my graph from left and set (the current time - 2 hours) to xlim. I tried to add to the "update" function this
self.ax.set_xlim(left=max(self.data.iloc[0, 0], self.data.iloc[-1, 0] - pd.Timedelta(hours=2)))
But this is doesn't work.…

An Ri
- 406
- 5
- 13
0
votes
1 answer
Why the view doesn't change with the new data that plotted by FuncAnimation?
I am plotting some data, but see nothink. If you zoom out, you will find, that the data is plotted on other side of fig, and the view doesn't...automatically changed for be able to see data. Could someone help me, please?
from matplotlib import…

An Ri
- 406
- 5
- 13
0
votes
1 answer
How do I animate this graph to just display the next row
enter image description here
So I tried this, I'm working in a jupyter notebook and am wondering how to animate the next row of data.
enter code here
def animate(i):
data = df.iloc[i]
return data
ani =…

Bradley Spencer
- 5
- 1
0
votes
0 answers
Issue with FuncAnimation of matplotlib
Appreciating your time and effort to go through my code and helping me to find the solution.
I am using FuncAnimation of Matplotlib to refresh/update my plot every 1min.
The Data is extracted using Yahoo finance every 1min. But I am getting…

kbsudhir
- 415
- 1
- 6
- 15
0
votes
1 answer
Progressing plot in Matplotlib
I need to plot a progressing plot in matplotlib.
I have a list of lines that I need to plot. However, I need to show the lines one after the other.
Line 1: (0,0) - (0,1)
Line 2: (0,1) - (1,1)
Line 3: (1,1) - (2,2)
What I want is as follows:
I want…

Amogh Bhosekar
- 181
- 5
0
votes
0 answers
Animated title with matplotlib.ArtistAnimation
I have the following script using matplotlib.animations that returns animated yield curve plot over-time which work fine :
test = pd.read_csv("test.csv")
test = test.iloc[:, 1:]
test = test.to_numpy()
date = test.iloc[:, 0]
plots = []
fig, ax =…
0
votes
0 answers
scattering a set of 3d points over time
I have a data set of the following class:
class Event:
def __init__(self, timestamp, lx, ly, lz, nature):
try:
self.timestamp = datetime.strptime(timestamp, "%d/%m/%Y %H:%M")
except:
self.timestamp =…

Ali11H
- 11
- 3
0
votes
1 answer
Animate points with matplotlib
I want to have 10 moving points. I used the code below. I'm experimenting with matplotlib which I don't know very well.
from matplotlib import pyplot as plt
import numpy as np
from matplotlib import animation
fig = plt.figure()
ax =…

Kώστας Κούδας
- 209
- 1
- 9
0
votes
0 answers
animated multi-subplot with matplotlib hist
I try to adapt this code animated plot line to similar situation but using hist in lieu of line plot and expend it to 4 subplot. It seem to be an easy task with this great exemple but I struggle an error on the adaptation.
line1, = ax1.hist([],…

Jonathan Roy
- 405
- 1
- 6
- 18
0
votes
1 answer
Plot signal data and skip frame with missing information using Matplotlib FuncAnimation
I am imitating getting stream of data where not each "message" line has the information I want to plot in live mode. Since each line will still be read, how can I skip one iteration (frame) and therefore skip plot update for 1 frame until next…

tishafok
- 13
- 4
0
votes
1 answer
Multiprocessing with Matplotlib Animation
In short, I am trying to run a live monitoring dashboard while calculating data in the background. Here is the code for my monitoring dashboard:
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.animation import FuncAnimation
import…

Aaron Gonzalez
- 86
- 11
0
votes
0 answers
Plot live streaming data (two y-axix values sharing same x-axix) in python
I want to achieve the following:
Here, the blue line must be the live streaming data obtained from a sensor (the above plot is of the stored dataset, not the live streaming). I'm trying to find the anomaly in the sensor data and show it along with…

santobedi
- 866
- 3
- 17
- 39
0
votes
1 answer
Slider is unresponsive when figure contains two plots
Python 3.9, matplotlib 3.4, Mac OS 11.6.1
I have a slider on a tkinter Toplevel containing a figure convas showing two sets of axes. As the slider advances, the axes illustrate the heatplots over time for two sequences of 4-by-300 matrices. Each…

fishbacp
- 1,123
- 3
- 14
- 29
0
votes
1 answer
Matplotlib video zooming and quality
I already figured out how to save a video animation and zooming a picture with matplotlib.
I want now to merge the two things and understand how to introduce zoom in an animation: reading some documentation I noticed it's not straightforward for…

Rob Tan
- 159
- 9
0
votes
0 answers
How can I use graphic card to accelerate the speed of video output via matplotlib.animation.FFMpegWriter
I am working on a simple video using matplotlib.animation. I couldn't help noticing that each time I run my project it took a rather long time to save the video. I am using a graphic card with the model of 3080Ti and when the code is running, CPU is…

yangyang
- 125
- 1
- 6