Questions tagged [matplotlib-animation]

This tag is for questions related to the matplotlib animation API

matplotlib.animation API

383 questions
-1
votes
2 answers

Matplotlib animation.FuncAnimation() animation miss first frame?

I am new to both Python and Matplotlib. I'have this code to plot a trajectory in a 3d Matplotlib subplot: import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from itertools import islice import sympy as…
pippo1980
  • 2,181
  • 3
  • 14
  • 30
-1
votes
1 answer

How to plot user interface

NOTE: This is what my code looks like, I keep getting errors with the portion in bold, I would like to be able to plot a straight line with the coordinates starting at 1,1 and ending at (1+lineLength), 1, so that I have a horizontal line. I am not…
-1
votes
2 answers

How to assign variable fig for animation function in Python 3

I want to make an animation of multiple plots whose rendering evolves in time. The files that I need are under the format, for example for one : DD0043/DD0043. So I use the trick : f'{43:04}' to fill the zeros leading for each file (the files go…
user1773603
-1
votes
1 answer

How to make video using matplotlib with a contour filed, a vector field, and a moving box?

I tried using plt.fill and patches to make the rectangle, but the result is that in the video, boxes of any previous time step are presenting in the field rather than the box moving as I want it to be.
hit
  • 31
  • 3
-2
votes
1 answer

how do I combine two 3d real time graphs into one?

Using matplotlib.animation.FuncAnimation, I made two 3d real-time graphs. I want to combine the two graphs into one. When I tried to find similar examples, I could only find examples of 3d graphs, not "3d real-time." How do I combine two 3d…
dallll
  • 1
-2
votes
1 answer

I'm trying to plot a data which should be displayed as a plasma effect. But seems I'm having trouble here

c = np.cos(20)**2 d = np.sin(20)**2 x = np.linspace(-np.pi,np.pi) y = np.linspace(-np.pi, np.pi) z = np.abs(np.cos(20 * (c + d))) x,y = np.meshgrid(x,y) plt.imshow(z) So this is the code so far. It's supposed to produce a plasma effect This was the…
-2
votes
2 answers

TypeError: plot_confusion_matrix() got an unexpected keyword argument 'title'

`import matplotlib.pyplot as plt from sklearn.datasets import make_classification from sklearn.metrics import plot_confusion_matrix from sklearn.model_selection import train_test_split from sklearn.svm import SVC cm_plot_labels = ['Normal',…
1 2 3
25
26