Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

I was trying to use Emacs as my editor for my research (I followed all steps in Jon Fincher’s guide on Realpython : [https://realpython.com/emacs-the-best-python-editor/]). I use jupyter notebooks a ...
valentin's user avatar
1 vote
1 answer
203 views

I have a pandas DataFrame that looks: d = {'time': [1, 3, 5,7, 9, 11, 13, 15, 17, 19], 'method1':[0.864231038, 0.874805716, 0.890315836, 0.906831719, 0.91634293, 0.928120905, 0.938231839, 0....
alxander21's user avatar
0 votes
2 answers
246 views

i am developing a weather monitoring program and i am stuck at a problem. the problem is when the array that contains the labels for the x axis exceeds the lenght of 50 the graph starts to break. and ...
Danoo's user avatar
  • 3
1 vote
1 answer
62 views

I have a class in which I used one of the codes in StackOverflow, this link :Managing dynamic plotting in matplotlib Animation module Now I want to edit this class and add some parameters to the class,...
Hadis's user avatar
  • 23
0 votes
0 answers
67 views

Preliminaries Python: 3.11.1 x64 tkinter: 8.6 matplotlib: 3.6.2 VsCode 1.77.2 on Windows 10 21H2 Summary I have a simple app that plots a graph on a tkinter canvas, records the image and then ...
craigB's user avatar
  • 421
1 vote
1 answer
547 views

I want to add the colormap to show the gradient along x axis but unfortunately the whole figure turns black. I might be lacking something kindly help me in this. Here is the code. import matplotlib....
Prashant Priyadarshi's user avatar
0 votes
1 answer
274 views

I want to create live plots of my results and found this SO question which did most of the job: Matplotlib animation update title using ArtistAnimation BUT, when I start the script, the first figure ...
JD.'s user avatar
  • 341
0 votes
0 answers
280 views

I have an animation working well with FuncAnimation. My goal is to change a parameter with a slider and update the animation instantly. I don't know how to combine both. You'll find my code down here, ...
Malo's user avatar
  • 13
0 votes
0 answers
17 views

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def rectangle_random_walk3(n, w, l): bounces = 0 x = 0 y = 0 path = [(x, y)] for i in range(n):...
Jacob_L_660's user avatar
0 votes
1 answer
79 views

I am trying to make an animated plot to show the behavior of a simple harmonic oscillator. I would like for this animation to be a combination of the following two plots. That is, I would like the red ...
Luis Mario Nunez Beltran's user avatar
0 votes
1 answer
3k views

So, The data looks like this: (the spaces represent different columns, and the data represents 10 particles going around a central particle "Sun" and at different time steps in this case ...
Jacob Mireles's user avatar
0 votes
1 answer
368 views

I am trying to write a program that will run a persistent homology animation on some random data. Here is the code that I have so far: import numpy as np from ripser import ripser import matplotlib....
The Mad Scientist's user avatar
1 vote
1 answer
270 views

I am trying to save a matplotlib animation but i always get a FileNotFoundError. import matplotlib.animation as animation anim = animation.FuncAnimation(fig, plot_update, frames = vel, init_func = ...
Øystein Bringsli's user avatar
-2 votes
1 answer
46 views

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 ...
dallll's user avatar
  • 1
0 votes
1 answer
245 views

In a measurement chain, each instrument embedded in various measurement loops will record a CSV and I want to monitor the live plots in separate figures i.e figure 1 for instrument1 , figure 2 for ...
datac's user avatar
  • 39
1 vote
1 answer
928 views

I am not able to make (animated) labels using FuncAnimation from matplotlib. Please find below a minimal code that I made. ax.annotate has no effect at all - the animation itself works though. What ...
cerv21's user avatar
  • 443
0 votes
0 answers
241 views

I have a Finite Difference Simulation that is plotted with the following command: anim = ani.FuncAnimation(fig, update, init_func = init, frames = np.linspace(0, t_max, int(t_max / dt + 1)), repeat = ...
Jacob Ivanov's user avatar
0 votes
1 answer
565 views

I have a df containing x,y coordinates of a mouse's snout that I want to use for an animated scatterplot. Currently, I have the code for a static scatterplot. import pandas as pd import numpy as np ...
Brian Constantinescu's user avatar
1 vote
0 answers
147 views

I have this kind of an animation and I want to integrate it to my GUI. here is the plot But, the background color is set to black right now. Here is the code. I am using Windows 10 and for GUI I am ...
Harun Harman's user avatar
0 votes
1 answer
231 views

I'm failing to find the most efficient way to generate a simple animation of a spinning globe with a filled contour using cartopy. The following code yields a static gif, probably because the figure ...
Mathieu's user avatar
  • 305
0 votes
0 answers
44 views

def simulate(foo): plt.cla() for key in plotdata.keys(): plt.plot(plotdata[key],label = key[:-1],color = key[-1]) #do some stuff with data ani = ani.FuncAnimation(plt.gcf(), simulate, ...
TadoTheMiner's user avatar
1 vote
3 answers
96 views

I am exporting an animation in python but the legend is repeating. I have only one plot and want to have one single legend item in every frame of the animation. This is my script: import numpy as np ...
Link_tester's user avatar
  • 1,081
1 vote
0 answers
114 views

I had a question about python matplotlib I wanted to know in this library Is it possible to make grid diagrams in which circles are drawn and connected and intersected by lines? In the network graphs ...
KVANKER KVANKERI's user avatar
0 votes
1 answer
816 views

OS: Windows 11 Python: 3.9 I can extract a number of audio features from .WAV files by using OpenSMILE and plot them with MatPlotLib. I can also select segments by clicking that chart (like, a segment ...
AlexSC's user avatar
  • 1,953
0 votes
1 answer
226 views

I have a 3d scatterplot that needs updating. however, there is no variable that lets me address single datapoints. self.fig = plt.figure(figsize=(8, 8)) self.ax = self.fig.add_subplot(111, projection='...
I Me's user avatar
  • 5
2 votes
0 answers
443 views

After getting a matplotlib animation to run successfully inside a Vscode Juypter notebook cell, I decided to refactor the matplotlib animation code into a function but this causes the matplotlib ...
gameveloster's user avatar
  • 1,633
1 vote
1 answer
468 views

I’m trying to write a Bar Chart Race with matplot. I don’t use the "bar_chart_race" library because I need more options for customization later. But I use the basic explanations of the same ...
Palladium46's user avatar
3 votes
3 answers
627 views

I am trying to animate a patch.Rectangle object using matplotlib. I want the said object to move along a path.Arc. A roundabout way to do this would be (approximately) : import numpy as np from ...
Adrials's user avatar
  • 75
1 vote
1 answer
2k views

I am trying to create a simple matplotlib animation in a Jupyter notebook running inside vscode. %matplotlib notebook import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation ...
gameveloster's user avatar
  • 1,633
0 votes
1 answer
2k views

I have code that is running on a different machine. %matplotlib widget import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np n = 100 x = np.random.randn(n) def ...
Николай Чурилов's user avatar
1 vote
0 answers
168 views

To test the matplotlib's interactive mode, I used the following two code snippets: Snippet 1: Has plt.ion() with no call to fig.canvas.draw(): import numpy as np import matplotlib.pyplot as plt x = ...
Deepak Tatyaji Ahire's user avatar
1 vote
1 answer
367 views

https://matplotlib.org/stable/gallery/event_handling/cursor_demo.html Im trying to make a cross hair cursor with a annotation on the right axis to show the Y-value everything works fine except when ...
Beginner's user avatar
0 votes
1 answer
93 views

I am attempting to make an animated plot of a theoretical Falcon 9 disaster trajectory due to an engine failure. However, my code, shown below: import numpy as np from scipy.integrate import solve_ivp ...
Jacob Ivanov's user avatar
1 vote
1 answer
134 views

I have a plot in which I want to plot the following two data sets x1,y1 = np.random.normal(0,1, (2,20)) # dataset 1 x2,y2 = np.random.normal(0,1, (2,20)) # Next, I create a plot and the ...
Mitchell van Zuylen's user avatar
1 vote
0 answers
241 views

I try to animated live data. It used to work but now it does not. I have the following code: import subprocess import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation def plot(i)...
Din's user avatar
  • 33
0 votes
1 answer
61 views

I want to make an animation of a drum vibration in python. My problem is that the zero point of the z_axis keeps moving. How can I freeze the z_axis? video link fig, ax = plt.subplots(subplot_kw={&...
afshin's user avatar
  • 1
3 votes
1 answer
9k views

I am trying to plot a single pendulum using Eulers method and with given theta values and formula in python but I am getting an Attribute error on FuncAnimation saying 'FuncAnimation' object has no ...
Óli Jón Ólason's user avatar
1 vote
0 answers
54 views

i am working on a cellular automaton to simulate in 2D an earthen dam failure using python, the simulation is supposed to show step by step the process by setting 1. the cellular state. 2. defining a ...
Francis Benisemeni's user avatar
3 votes
1 answer
286 views

I would like to draw a dynamic network to show how it changes over time as new observations are added. I've found how to animate a network given two single states (here called s_pos, t_pos), but what ...
Kamaloka's user avatar
  • 139
0 votes
1 answer
48 views

import numpy as np import matplotlib.pyplot as plt from io import BytesIO from PIL import Image r = 18 h = 1.7 num_of_steps = 1000 emp = 3 time = np.arange(0, 100, 0.4) phi = [] theta = [] Amp = np....
SvylantisCPU's user avatar
1 vote
1 answer
142 views

Im am trying to produce the shortest distance between the two orbiting points (Earth and Jupiter) created by this orbital model. I'vebeen working on this for quite some time but have been struggling. ...
Orla's user avatar
  • 23
2 votes
0 answers
1k views

I'm trying to animate the collision physics of N number of balls in matplotlib, but when I try to run the program, I get an AttributeError: 'NoneType' object has no attribute '_get_view' error. How ...
Nord's user avatar
  • 21
0 votes
1 answer
621 views

I'm just trying to make a live graph using matplotlib.However I couldn't find a way to draw-remove-redraw axhline(). My aim is to show a horizontal line of newest value of Y axis values and of course ...
enis's user avatar
  • 1
1 vote
1 answer
470 views

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import mpl_toolkits.mplot3d as Axes3D r = 20 h = 1.7 phi = np.linspace(0, 4*np.pi, 1000) theta = np....
SvylantisCPU's user avatar
0 votes
1 answer
41 views

I have n curves that I draw using matplotlib's animation. Thanks to a previous question and the answer to it, this works well. Now I want to add some text in the plot which is continuously updated, ...
Alf's user avatar
  • 2,029
1 vote
1 answer
314 views

I have n curves that I want to draw using matplotlib's animation (each curve corresponds to a gpx file recorded with a fitness tracker or a smartphone). It works well when using only one track or two ...
Alf's user avatar
  • 2,029
-2 votes
1 answer
45 views

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 ...
Katseku Godfred's user avatar
1 vote
0 answers
64 views

I'm struggling with this issue for some time so I have decided to finally ask here. First of the code is available at this adress: https://github.com/ChrisZeThird/Game-Of-Life/tree/main/ObjectOriented ...
Chris Ze Third's user avatar
3 votes
1 answer
683 views

I am trying to plot world population map using geopandas and matplotlib. I also use matplotlib animation to make graph animated for each year. import matplotlib.ticker as ticker import matplotlib....
beridzeg45's user avatar
0 votes
1 answer
43 views

Hi I'm new to this Site and appreciate your help. I have a variable resistor and it reads analog value and send to the python script. My objective is to plot this value using bubble plot which ...
Kasun Thushara's user avatar

1 2
3
4 5
9