Questions tagged [matplotlib-animation]

This tag is for questions related to the matplotlib animation API

matplotlib.animation API

383 questions
0
votes
1 answer

Matplotlib animation, bars are getting white after a while

What am I doing wrong? Can anyone help me? Or give me specific keywords for google search (I'm sure I'm not the first)? Have been dealing with this problem for over 8h now, cant find something on the internet. Full Notebook Link (problem at the…
0
votes
0 answers

save matplotlib animation in lossless quality format

I would like to know if it possible to save matplotlib animation with lossless quality (or even vectorial format) I have the following animation from matplotlib examples import numpy as np import matplotlib.pyplot as plt from matplotlib.animation…
Trailer
  • 155
  • 9
0
votes
0 answers

Why does my code add an extra frame in front of my animation?

I've been coding a Python program that will take a list from a different program, take specific values from that list, and add them to a 2D list. This subsequently creates an animation, with one frame per sub-list within the 2D list. However, when…
0
votes
3 answers

How can I animate a matplotlib plot from within for loop

I would like to update my matplotlibplot with values calculated in each iteration of a for loop. The idea is that I can see in real time which values are calculated and watch the progress iteration by iteration as my script is running. I do not…
Aesir
  • 2,033
  • 1
  • 28
  • 39
0
votes
0 answers

How can I make my scatter plot animation smoother with matplotlib?

I am using matplotlib animation to graph the location of the inner planets relative to the sun for the past year. For the data I am using SPICE to create a point for the position each day, stored in an x and y array (365 values each). This is my…
Holden
  • 632
  • 4
  • 15
0
votes
0 answers

Viewing Matplotlib funcAnimation live plots in browser

I am generating a live plot using matplotlib's funcAnimation function such as in the example below. To be clear I am plotting data that is dynamically updating in real-time and I want to view these updates in the browser rather than in its own local…
wrahman
  • 123
  • 1
  • 10
0
votes
1 answer

python matplotlib: onclick does not work, please show me why and how to pause and resume the animation,

I would like to pause and resume animation when click on figure by mouse, but it does not work, please help me to fix it, thank you, import matplotlib.pyplot as plt import numpy as np import matplotlib.animation as animation x = np.arange(100) y =…
0
votes
1 answer

Delete last while cycle from plt.plot

Im working in some Euler Equations about Draining a Conical Tank but I'm having problem when I plot the simulation. My intention is reduce the radius of the tank while time increases. I want to delete the first blue line after the first cycle, but…
0
votes
1 answer

Develop wireframe to plot aircraft tracks with Lat, Lon and Alt

I am unable to draw a wireframe (not a map) with Lat, Lon and Alt. My data looks like this: latitude longitude altitude 0 53.65947 -1.43819 14525 1 53.65956 -1.43921 14525 2 53.65979 -1.44066 14500 …
0
votes
0 answers

""TypeError: 'Axes3D' object is not subscriptable"" for 3d animation from data

I am trying to do a 3D animation using data from two arrays. So I paint 2040 triangles in the 3d plain and I don't want them to change overtime. Then I paint them different colors that I take from another 100 x 2040 array, one color for each…
0
votes
2 answers

Matplotlib how to move axis along data in a real-time animation

I'm trying to plot data that is generated in runtime. In order to do so I'm using matplotlib.animation.FuncAnimation. While the data is displayed correctly, the axis values are not updating accordingly to the values that are being displayed: The x…
0
votes
0 answers

AttributeError: 'Rectangle' object has no property 'angle' - python

I am working on generating an animation with a moving rectangle using matplotlib.animation. To do so, I first create a Rectangle (matplotlib.patches.Rectangle) at initialisation and then, within the loop, I set its coordinates, size and orientation…
0
votes
1 answer

Pyplot animation inserts large padding

fig = plt.figure() fig.add_subplot(2, 2, 1) fig.add_subplot(2, 2, 2) fig.add_subplot(3, 2, (3, 4)) draws as expected but the animation import matplotlib.animation as animation class Animation(animation.TimedAnimation): def __init__(self): …
OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101
0
votes
0 answers

matplotlib funcanimation return list of artist objects error: "list has no attribute set_animated"

I have a code that generates an animation and saves it to disk. My plots have a lot of lines and texts to be animated, so rather than writing "return line1, line2, line3..." i created a list of lines and a list of texts, and i just return the lists…
ghylander
  • 136
  • 8
0
votes
1 answer

matplotlib FuncAnimation, "tuple object is not callable"

Because i noticed that anim.save takes exponentially longer as more points are plotted, i'm trying to export animations of 400 points and then using ffmpeg to glue them together. However, i'm running into a TypeError: 'tuple' object is not callable…
ghylander
  • 136
  • 8