This tag is for questions related to the matplotlib animation API
Questions tagged [matplotlib-animation]
383 questions
0
votes
0 answers
Matplotlib animate multiple barcharts in subplots
I've successfully animated a single bar chart using FuncAnimation, but I would now like to have 3 bar charts concurrently in subplots. I can't work out what my animation function should return. I tried to adapt my code for one bar chart to make it…

TIF
- 191
- 1
- 2
- 11
0
votes
0 answers
Fitting a column from a pandas dataframe to animated histogram
I am attempting to produce an animated histogram that uses rows of data from a data frame I created. The code I am using to produce the histogram is below. The code works with data = np.random.randn(1000) but does not animate the histogram when I…
0
votes
1 answer
Why are matplotlib 3d animations not working when trying to use Line3D objects
I've got this code:
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as plt3d
import mpl_toolkits.mplot3d.art3d as artplt3d
import matplotlib.animation as animation
import numpy as np
import math
def animateBeta():
def…

AUDURIER Jules
- 1
- 1
0
votes
1 answer
Animate time-dependent 3D-function using matplotlib in Python
Hope someone can help me. My goal is to animate a function U(x,z,t) and in particular the time evolution of the 3D-function U(x,z).
Firstly I wrote some code that discretize the time stepping and saved each "snapshot" in an array U[t] where t is an…

G9MA
- 23
- 5
0
votes
0 answers
How to use plt.savefig() without using plt.show() and the end of matplotlib.animation.FuncAnimation
For example, this code works fine and saves the plt only when the plt.show() is present at the end. or else it just runs without saving any output.
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation
import numpy as np
def…

Suraj
- 1
0
votes
0 answers
Convert data to colors like scatter plot
When using matplotlibs scatter function, it is pretty neat to display data with colors:
data = np.random.random((3, 10))
scatter = plt.scatter(data[0], data[1], c=data[2], cmap='Viridis')
This will automatically map data[2] to a color spectrum that…

5cout
- 1
0
votes
1 answer
Refresh Animated Plot with Tkinter Scale Widget
I'm working on an interactive pseudo-standing wave demo, and I'm at a bit of an impasse. Essentially, the goal of this project is to recreate a variant of Melde's experiment, wherein a string is driven by an oscillator on one end with the other end…

SSimpossible
- 13
- 3
0
votes
0 answers
Creating a live plot of CSV data with FuncAnimation
I have been trying to plot CSV stream (been weeks - because of my limited understanding on Python & programming).
Previously, I have asked a question here & thankfully I received the answer, however, I realised that using matplotlib (for loop)…

messymon
- 33
- 1
- 8
0
votes
2 answers
matplotlib FuncAnimation won't start on button press widget event
matplotlib noob here.
I am trying to create an animation (which starts on a button click) of a normal distribution being populated, where the distribution parameters (mean and std dev) are selected using two slider widgets.
Please help. I have…

HarshaV
- 1
0
votes
2 answers
Why isn't FuncAnimation repeating when I'm put repeat = True as a parameter?
import matplotlib.image as mpimg
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib.widgets import Button
from matplotlib.widgets import Slider
fig = plt.figure()
image_list = …

mjasian
- 11
- 2
0
votes
0 answers
Is it possible to have 1 matplotlib slider control 2 different matplotlib animations?
If anyone has any experience doing this, please let me know as I would greatly appreciate it.

mjasian
- 11
- 2
0
votes
1 answer
matplotlib scatter animation in jupyterlab vanishes after initial frame
I'm have a JupyterLab notebook (v1.1.4) in which I'm trying to animate a scatter plot. I tried using the raindrops example from the matplotlib examples, and it runs fine, but I can't get mine to work.
Here's a MWE
%matplotlib widget
import…

scmartin
- 53
- 1
- 6
0
votes
1 answer
Configuring live graph axis with Tkinter and Matplotlib
I am currently trying to create a live graph on a window using Tkinter and Matplotlib. The data from this graph is continuously appended onto a CSV file and saved like this example row:
06/09/2020 19:57:53,4,2.549,3.546
Where the second column is…

Bill
- 5
- 4
0
votes
1 answer
visualise html video with matplotlib animation
In my notebook I get some data from URL, perform some analysis and do some plotting.
I want also create a html animation using FuncAnimation of matplotlib.animation.
So in the preamble I do
import matplotlib.animation as…

andrea
- 525
- 1
- 5
- 21
0
votes
1 answer
How to display Live Data using Python
I would like to display time series data of stock prices and averages in a Python 3 project.
The data is currently stored in a CSV file which is updated periodically and my interpreter is Anaconda.
I've tried…

Rafael Zasas
- 891
- 8
- 27