Questions tagged [matplotlib-animation]

This tag is for questions related to the matplotlib animation API

matplotlib.animation API

383 questions
0
votes
0 answers

Making an animated time-series graph that progresses through the data in real time

I am attempting to graph some heartrate data that is collected over the course of 4 minutes. The ideal graph will be an animation of the heart rate that moves in real time with the data (i.e., a 4 minute animated graph). The data looks like…
KNichs
  • 13
  • 4
0
votes
1 answer

How to set matplotlib chart scale so it doesn't change as line grows?

When I run this Python program the x and y axes scale adjusts as more data gets plotted. Is it possible to set a scale to which the chart will be created to and have it not change during excution? I had tried plt.xlim(0, 30) and plt.ylim(0, 1050)…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
0
votes
0 answers

How to prevent i from incrementing until there is an applicible value in the csv file in my Python program?

This Python program plots lines dynamically from data in a csv file. When the program first starts it dynamically draws points that already exist in the file. This part works as expected. I'd like for any new points added to the file to be…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
0
votes
1 answer

Tkinter graph animation Start/Stop button

So the graph animation I have works fine, however it is always running in the background when i start the GUI. But i only want it to start when i press a "Start" button. I've done a work around that just increases the interval insanely high and it…
steffen
  • 67
  • 8
0
votes
0 answers

How do i animate using matplotlib?

I try to animate my random walk code. I have two lists that i want to animate, peopleX and peopleY. peopleX = [[-9, 9, -18], [-10, 9, -18], [-10, 9, -18], [-10, 10, -18], [-9, 10, -17], [-10, 10, -18]] peopleY = [[-14, 16, 3], [-15, 15, 3], [-16,…
0
votes
0 answers

Python animate live plotting fetching data from Mysql Table

I am trying to read the latest row from a table and plot the graph using animate and matplotlib in python. The table gets updated every 1 second with a new value. I need to simulate the graph by live plotting the values. However, when I use animate…
Dhiraj
  • 21
  • 1
  • 6
0
votes
1 answer

Dynamically scaling axes during a matplotlib ArtistAnimation

It appears to be impossible to change the y and x axis view limits during an ArtistAnimation, and have the frames replayed with different axis limits. The limits seem to fixed to those set last before the animation function is called. In the code…
user1889776
  • 401
  • 4
  • 13
0
votes
1 answer

Animating Monte Carlo Method Pi color dots diferently

I want to have an animation of my plot of my results of the mc method calculating pi; but having the inner circle dots colored differently than the others. How can I do that? This is my code so far: import matplotlib.pyplot as plt import numpy as…
0
votes
1 answer

matplotlib animation adding weird box to corner of plot in MPEG

I'm using matplotlib animation package to create an animated graph. I'm using celluloid package to simplify things, and so I can draw a seaborn plot. I can't figure out why a little box is appearing in the saved video: Here is my…
Adam B
  • 3,662
  • 2
  • 24
  • 33
0
votes
1 answer

Error with 3d scatter animation update function

I am simulating sprinkler in 3D. In a previous question, I was helped to animate it in 2D (thank you @William Miller). I tried to use the same logic and implement it into 3D. In the update function, I get the following error: 'tuple' object is not…
marlise23
  • 73
  • 1
  • 1
  • 6
0
votes
2 answers

Animated Scatter Plot

I would like to do an animation in python representing each point, dot by dot. I am doing it as I always have done it, but it does not work. Any help? I tried 2 different ways. import matplotlib.pyplot as plt from matplotlib.animation import…
0
votes
1 answer

3D line animation on top of a 3D surface

I am trying to create a 3D line animation, on top of a 3D surface plot in matplotlib. I am able to plot the 3D surface, but there is no animation. And there is no error in the code. I am setting the X,Y and Z values of the 3D line upto the current…
0
votes
1 answer

Matplotlib animation in browser

I'm having trouble trying to view my animated graph in the browser using mpld3. Any tips as to what I'm doing incorrectly? If I could figure out how to convert it to html so I can embed it in my website, that would be even better. import…
Mimi
  • 11
  • 1
-1
votes
1 answer

How to simulate and display gas particles moving in a box

import matplotlib.pyplot as plt import numpy as np from matplotlib.animation import FuncAnimation fig = plt.figure(figsize=(4, 4), dpi=80) ax = plt.gca() scatter = ax.scatter([], [], s=0.1) x = dz * np.random.random(N) y = dz * np.random.random(N) z…
-1
votes
2 answers

ValueError: assignment destination is read-only

My goal is to make aliasing in python but actually i have problem ValueError: assignment destination is read-only. This because of this line numpy_new[:lines * k][:][:] = numpy_last And I don't know how solve this. import warnings import numpy as…
1 2 3
25
26