Thanks, really good explanation! I was trying to improve animation performance myself in the last days, and one thing worth mentioning is that blitting works only with interactive backends, but if you are saving it to a movie it silently reverses to full redraw, which is not documented in FuncAnimation nor Animation classes, and it took me some time to realize by studying sources and debugging. So in that case you need to implement it yourself not relying on FuncAnimation.
Nice to see how you went through the journey... Look at this... .. but if you do it this way ..... So yeah, don't get the UI to plot/scale ... and it's REALLY quick!
Great vid cheers. Would the fps be improved by updating more than one line at a time. Currently need to plot sensor data that comes in every 13.5ms but it occured to me i could maybe plot two data points every 27ms? Would this work? I realise it may look less smooth but this way it would only require 37fps to stay real-time right?
Thank you for your excellent video. On line 103 of your code, is shows lineL.set_data(t[frame], y[frame]) where frame is a single number from range(N). This produces an error. Please tell us why your code functions. Thank you!
Very invaluable and instructive video. I am making an automatic data logging device using a raspberry pi for my gf for her research work and I was searching for exactly this. Btw, any idea on how to decouple the data processing logic from the matplotlib gui? I really need to offload the data processing task to a different thread because it hangs the gui and the timings are way off. It is usually advised not to put time consuming code in gui event callbacks (here the events are probably some kind of timer events).
I'm not a pro so my idea might not suits for you. I'm doing something like that. What I decided, I write the logged data in live to a csv file along with a timestamp so generate a graph I don't really need during the recording. (a device insert into a slot and the force recorded from a weight sensor readings). Because it's a .csv file easy to process later on even with excel.
The code is in the video. The info Dave's Space shared is more than valuable enough for you to pause the video and write out the code manually. Like in the good old 80's computing days, and the code blocks aren't too big.
Thanks, really good explanation! I was trying to improve animation performance myself in the last days, and one thing worth mentioning is that blitting works only with interactive backends, but if you are saving it to a movie it silently reverses to full redraw, which is not documented in FuncAnimation nor Animation classes, and it took me some time to realize by studying sources and debugging. So in that case you need to implement it yourself not relying on FuncAnimation.
Wait really‽‽‽ That is some really good information!! Thank you so much for commenting this :)
Very nice overview, thanks a lot! My takeaway: fix the limits of axes to fit the final plot since the first frame and just blit away 😅
Great video. Very informative for the tradeoffs of the different approaches!
It's great...could you please share the python code?
Nice to see how you went through the journey... Look at this... .. but if you do it this way ..... So yeah, don't get the UI to plot/scale ... and it's REALLY quick!
For something like a simple count you can use a text object inside the canvas and update that.
Also what is the function getfigax()? can't seem to find documentation on it
He shows part of the function getfigax() around 1:16
Great vid cheers. Would the fps be improved by updating more than one line at a time. Currently need to plot sensor data that comes in every 13.5ms but it occured to me i could maybe plot two data points every 27ms? Would this work? I realise it may look less smooth but this way it would only require 37fps to stay real-time right?
Great information, thanks for sharing!
Thank you, very useful!
This is great.
Thank you for your excellent video. On line 103 of your code, is shows lineL.set_data(t[frame], y[frame]) where frame is a single number from range(N). This produces an error. Please tell us why your code functions. Thank you!
Very invaluable and instructive video. I am making an automatic data logging device using a raspberry pi for my gf for her research work and I was searching for exactly this.
Btw, any idea on how to decouple the data processing logic from the matplotlib gui? I really need to offload the data processing task to a different thread because it hangs the gui and the timings are way off. It is usually advised not to put time consuming code in gui event callbacks (here the events are probably some kind of timer events).
I'm not a pro so my idea might not suits for you. I'm doing something like that. What I decided, I write the logged data in live to a csv file along with a timestamp so generate a graph I don't really need during the recording. (a device insert into a slot and the force recorded from a weight sensor readings). Because it's a .csv file easy to process later on even with excel.
❤
We want the code!!!!!!!!!!!!!! great thing : ) 🤧
With animtion
Friend where is code???
So we can try by our too...
The code is in the video. The info Dave's Space shared is more than valuable enough for you to pause the video and write out the code manually. Like in the good old 80's computing days, and the code blocks aren't too big.
@@kychemclass5850 You right and actually type in a code more useful to learn the language than just copy/paste only.
How to kivy metapolt plt.gcf convert plt.show()