Matplotlib Tutorial 16 - Live graphs

preview_player
Показать описание
In this Matplotlib tutorial, we're going to cover how to create live updating graphs that can update their plots live as the data-source updates. You may want to use this for something like graphing live stock pricing data, or maybe you have a sensor connected to your computer, and you want to display the live sensor data. To do this, we use the animation functionality with Matplotlib.

Комментарии
Автор

I'm really loving all your videos. The speed is awesome. I don't mind pausing to read the code in some places because it means we blaze past the concepts I'm already familiar with. Great series.

fireraisr
Автор

building a chatbot that displays data to the host and came across this when looking to visualize the data it collects. Excellent explanation! I really appreciate you going into detail for each component to explain *why* it gets added to the code. Thanks!

Jimming
Автор

its awesome to have an expert explain the simple stuff. cant thank you enough for the time you put into this series

happyhippr
Автор

I was having a weird issue where the Y axis wasn't numbered in order. I changed the code to xs.append(float(x)) and ys.append(float(y)). This seemed to fix the issue.

davidkaplan
Автор

Interesting videos you publish. I have been following you as I go through my quest in learning python. You always give a good point of view slightly different of what I have found on other tutorials.
Today I make a comment cause I was just seeing this tutorial of live plotting and I saw that with my data I saw that my x-axis the data was not taken in ascending order instead was (1, 10, 2, 3, 4...) when you passed to the 2 digit number.
What I did is that I just added the int() to each append of the "xs" and "ys" and this solved the issue.

Thanks again for your videos dude.

ralphcastro
Автор

5:04 where does the variable "i" get called in the def animate (i): function?

loudborker
Автор

You really make this stuff understandable. Reading documentation can get pretty daunting. Thanks!

BrowFinGarf
Автор

Never thought this would be so easy! Thanks Harrison. Even though every now and then some idiotic...xd ... error pops up because of my own shortcomings but no worries I think these things happen when you are on a learning curve. Thanks again.

saadahmed
Автор

loading data from a sensor is exactly what i need this for :)

damlurker
Автор

For those of you guys who have the problem of no updating fig with txt file. Just remember to have '%matplotlib notebook' at the very beginning of the jupyter notebook file, before 'import matplotlib.pyplot as plt'

vampcj
Автор

Now that is what I call a real "INFLUENCER"

sriti_hikari
Автор

hi - running this in jupyter notebook, the plot does not live update when the example data file is added to. i need to manually re-run the code to re-plot the chart which then shows the new points in the example data file. How to automate?

markd
Автор

God bless you, You are great, Thank you very much for simplifying this

MarhabanBek
Автор

i have 1 problemwith this if i wanted to plot a continuous stream of data this doesnt really work

cosmosmusic
Автор

I love the way you explain. Thank you for a great a tutorial.

vikramtheone
Автор

Hi
i was trying to write this code for learning purposes but i stuck with an error, which says:

AttributeError: 'builtin_function_or_method' object has no attribute 'split'

so i need help to figure this out
i am using Debian 10 and atom as my editor

fisicawaheed
Автор

Hi! Thanks for your great tutorials!
Is it possible to start and stop the animation function, by pressing a button for example?

meins
Автор

Really, really clear. Best material on the subject! Thank you!

BentoMontenegro
Автор

Is there a reason why I cannot get this to happen in either Spider or Jupyter Notebook GUIs? Any help on this would be appreciated.

gileswhiting
Автор

I seem to have a problem... The case is that the plt() function stops all code that comes after, after plt() has been executed. I have put both the write() and animate() functions in a while-loop, but the problem is that the while-loop wont't be executed at all, as the plt() (places before the while-loop) function prevents it from doing so. Is there a solution to this?

ReasonableTechReviewer