Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
7k views

import matplotlib.animation as animation The error show up when I import matplotlib.animation I tried to reinstall numpy scipy and matplotlib, but it didn't work environment list -torch=1.12.1 ...
Bo Zhong's user avatar
2 votes
1 answer
419 views

I have the following code in python to convert a plot into an animation. import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.animation import PillowWriter fig,...
AmolosRicha1's user avatar
-1 votes
2 answers
4k views

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 ...
Grzesiu Holui's user avatar
1 vote
1 answer
398 views

So i have my initial array 'P' with the same number (500) 100 times I made a while loop to randomly update two numbers in the P array (number 1 will lose/win 75 points so number 2 will do the opposite)...
Victor Lozano's user avatar
1 vote
0 answers
124 views

Good morning, I have set up a code that: Asks the user to provide the value of a certain parameter through a slider On the basis of the given parameter, it solves an equation in the time domain It ...
Francesco's user avatar
  • 121
1 vote
0 answers
152 views

I have Tkinter Matplotlib canvas with scatter plot with 2 dots inside a polygon once click the "show polygon" button. As a part of my exercise, I have coded to include 4 intermediate dots ...
SW84's user avatar
  • 25
1 vote
0 answers
86 views

I am trying to create this animation using Matplotlib animation features in Python. Unfortunately, I am not able to figure out what would be the driving logic for keeping the main curve intact and ...
Soham's user avatar
  • 873
1 vote
1 answer
204 views

Context: I am trying to create a teaching demo tool to show how the iteration guesses through a set of points to ultimately arrive at the root of an equation Problem: I want to animate using ...
Soham's user avatar
  • 873
1 vote
1 answer
138 views

I am trying to animate a simulation. I want to include the time of the simulation. I have written the following code: import matplotlib.animation as animation fig, ax = plt.subplots() ims = [] for i ...
bhoutik's user avatar
  • 11
0 votes
2 answers
614 views

I am trying to make a multicolor line plot using matplotlib. The color would change given a specific value in a column of my datataframe time v1 v2 state 0 3.5 8 0 1 3.8 8.5 0 2 4.2 9 1 3 5 12 0 4 8 ...
Art's user avatar
  • 142
0 votes
1 answer
330 views

I am animating a time series that has 3600 timesteps. I only want to plot timestep 1200 to 1800 in an animation, however I can only get the animation to run from the very first time step onwards. ...
nia's user avatar
  • 64
0 votes
0 answers
1k views

I wrote a program that should generate a dynamic graph that shows the frequency of each face of the 6-sided dice coming up but when I run my code in the console <Figure size 432x288 with 0 Axes> ...
jemmitbliss's user avatar
1 vote
1 answer
595 views

I have a loop of two axes doing a scatter plot with a pause between points. fig, ax = plt.subplots(2) for i in range(10): y = np.random.random() x = np.random.random() ax[0].scatter(i, y) ...
Governor's user avatar
  • 312
0 votes
1 answer
843 views

Using Matplotlib I made a 3D simulation of some moving objects. Currently, it is defaulted in a way such that if I drag my cursor across the screen I can move the plot around and see the objects in ...
Sasha Ivanov's user avatar
1 vote
1 answer
587 views

I have 3 columns of data representing 3 pixels (x1, x2, x3), that update live. I want to: animate a scatter with x1 at x=1, x2 at x=2, x3 at x=3 have a distinct color for each of the pixels (x1=red, ...
Leo's user avatar
  • 1,168
0 votes
0 answers
242 views

I am trying to embed a matplotlib FuncAnimation live updating plot to a tkinter window but I am getting 2 plots (one inside the tkinter window and other as an extra matplotlib plot) as shown below. ...
Amazonian_panda's user avatar
1 vote
2 answers
671 views

I want to make a very simple animation of 3 frames: In the first frame there are only tree black circle, In the second the same black circles and an arrow above the last one, In the last there are 3 ...
apelle's user avatar
  • 154
0 votes
2 answers
346 views

The following dataset needs to be animated with years as a bubble plot. With the year, Life Expectancy(X-Axis) and GDP(Y-Axis) need to be changed. df.head() Following Image for the Year of 1960 : ...
viththi's user avatar
  • 151
0 votes
0 answers
221 views

I am using python3.8 on Linux Mint 19.3, and I am trying to save an animation created by a cellular automata model in matplotlib. My actual code for the model is private, but it uses the same code for ...
DarthMalloc's user avatar
0 votes
0 answers
576 views

Here is my code. I'm using matplotlib.animation.FuncAnimation to create an animation that displays a series of images. # Function that animates the FAI images # Grabs the i'th member of nir_images ...
John Momberg's user avatar
0 votes
1 answer
159 views

I'm trying to add labels to animated 3D plotlines using matplotlib.animation. The sample code I am using is based on this example from the matplotlib example files EDIT: full code is here: import ...
JTM's user avatar
  • 1
3 votes
2 answers
19k views

Note: only the last code chunk brings an error. The earlier chunks are to give context to the animation that I want. This is all in Jupyter for Windows. I have a matplotlib pyplot with two line ...
Matt Birch's user avatar
0 votes
1 answer
235 views

Click Here for the image trying to plot an animated line chart in python. Why is this code returning to a blank white plot ? a guidance would be appreciated. And also if there is a better way to draw ...
Writabrata's user avatar
0 votes
1 answer
167 views

I'm creating an animation of an image with axis values varying over time. All_data is a matrix that contains in one axe time frames inside there are 3 quatities which are longitude latitude and pixel ...
slimguat's user avatar
1 vote
1 answer
869 views

I would like to add a colorbar to some data to make an animation. However, I keep on creating new color bars in the figure and don't know how to remove them. A reproducible example is: import numpy as ...
user avatar
0 votes
1 answer
115 views

I have an array x_trj that has shape (50,12), and I would like to make an animation for all the rows corresponding to certain columns in a 2-D plot (so I can see what direction each line is going). ...
Randy Chen's user avatar
1 vote
0 answers
64 views

I am using Python with TKinter as GUI; and Matplotlib's FuncAnimation, to display 2 graphs next to each other. These graphs are representing sensor readings (temperature, humidity), and I would like ...
Jurgen Cuschieri's user avatar
0 votes
1 answer
123 views

I want to animate the Bubble Sort algorithm with FuncAnimationfrom matplotlib. My idea is to generate a random list of integers and initialize a bar chart plot with the values. Then I apply the ...
adama's user avatar
  • 567
0 votes
1 answer
1k views

I want to create an animation of a moving sphere in matplotlib. For some reason it isnt working: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from matplotlib ...
Tom's user avatar
  • 55
0 votes
1 answer
164 views

I am trying to animate a figure with 3 subplots for some data from a tensor log. I've made generator and animation functions which appear to yield the correct data, however when I do plt.show(), ...
scrungal's user avatar
0 votes
0 answers
48 views

I tried to run the example code from following site in Python 3.8: https://www.demo2s.com/python/python-matplotlib-animation-animate-decay.html However, I get the following error: C:\Users\username\...
Riemann's user avatar
  • 168
0 votes
1 answer
94 views

i am trying to plot an current-voltage acquisition from an instrument but for different temperatures. I need to keep the structure as presented but i would like to have for each temperature get the ...
datac's user avatar
  • 39
1 vote
1 answer
950 views

I am trying to animate a 3D surface over an initial 3D plot. But am struggling with keeping the initial 3D plot on the animation. I have to call the clafunction to be able to plot the new surface and ...
user avatar
0 votes
1 answer
223 views

I have a basic animation with a basic line plot, aka ax.plot(...). I modified it so it produces a stackplot instead of the lineplot (code snippet below). Problem is the the plot doesn't seem to clean ...
ateymour's user avatar
  • 309
2 votes
0 answers
1k views

I'm working on a fairly simple matplotlib animation using animation.FuncAnimation and it takes a very long time to run; about 0.81s per frame and 180s for the 220 frames in an 11 second long video. I'...
bcaddy's user avatar
  • 73
0 votes
1 answer
91 views

I am trying to learn how to animate this graph that calculates the integral of a function using the montecarlo method but to no success. I don't have much understanding of python, this is my first ...
Youssef Badr's user avatar
0 votes
1 answer
553 views

Program Description: I have a phone sending gyroscope data every 2 seconds to a server. Every second I retrieve data from the server. The purpose of my program is to read this data stream and make a ...
JoshJohnson's user avatar
0 votes
0 answers
63 views

I generated two location lists (x and y coordinates). Now I want to animate the movement(changing x and y) element after element. The FuncAnimation function of matplotlib seems not to work. The ...
oelbaron's user avatar
1 vote
0 answers
249 views

I have som problems with buttons/animations in matplotlib. I'm trying to make an animation that starts when the button "start" is clicked on and stop when "stop" is clicked on. The ...
Markus's user avatar
  • 23
0 votes
1 answer
431 views

I am using code from geekforgeek and copying it to jupyternotebook. from matplotlib import pyplot as plt from matplotlib.animation import FuncAnimation, writers import numpy as np fig = plt.figure(...
Madhav Rijal's user avatar
2 votes
2 answers
2k views

I know there are previous answers to this question but for some reason I cannot seem to get the animation to show. Instead all the frames of the animation are overlayed in a figure that appears below ...
Dan Nedelescu's user avatar
0 votes
0 answers
173 views

Im looking for a way to animate backtest plotting of the Backtrder. I searched for appropriate tools and I found FuncAnimation: FuncAnimation(figure, animation_function, frames=None, init_func=None, ...
teralee's user avatar
  • 11
2 votes
1 answer
1k views

In python matplotlib finance Is it possible to have two different figures with animation.FuncAnimation in mplfinance where one has 12 axis with different style and another figure has two planes one ...
Sunil Gupta's user avatar
0 votes
1 answer
879 views

I am attempting to show a sort of plot refresh on a sequence of array. Each array is an instance of the sequence and for each of them I want to plot the relative array, plus its smoothed version, like ...
Foolvio's user avatar
  • 15
2 votes
1 answer
3k views

I am updating the graph, but can't join to it the scatter, could someone help me, please? I don't understand, how to realize it. from matplotlib import pyplot as plt from matplotlib.animation import ...
An Ri's user avatar
  • 476
0 votes
1 answer
276 views

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[-...
An Ri's user avatar
  • 476
0 votes
1 answer
52 views

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 ...
An Ri's user avatar
  • 476
0 votes
1 answer
143 views

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 ...
Bradley Spencer's user avatar
0 votes
0 answers
187 views

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 ...
kbsudhir's user avatar
  • 445
2 votes
0 answers
86 views

I want to visualise the effect of an algorithm that takes a 2d vector as input and delivers an array of 2d vectors as output (where the array has the k-th iteration value at index k). The way I would ...
lpnorm's user avatar
  • 471

1 2 3
4
5
9