O'Reilly logo

Matplotlib for Python Developers by Sandro Tosi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Real-time plots update

We have all heard a lot about real-time these days and the possibility to always have fresh results as things change is becoming more important everyday. So the ability to update our graphs as soon as data comes in or changes is a really interesting feature for those applications (scientific mainly) where we deal with real-time streams of data.

Embedding our graphs in a GTK+ window allows us to use some additional sophisticated mechanisms provided by its underlying libraries, and one of these is the ability to simulate a real-time update of our plot.

To design our example in a slightly more realistic way, we decided to take the plotting data from a real source: our CPU (Central Processing Unit, the processor on our machine) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required