Posts

Showing posts from 2017

Realtime bokeh plotting with asyncio

Now and then the need arises to plot data in realtime. I know how simple this is using LabView but I always pefer Python for its versatility in data analysis. However when it comes to plotting data in realtime I have never seen any easy solution for Python. For my daily plotting needs I mostly use matplotlib but the Bokeh project is currently ahead when it comes to interactive plotting for the web. Another exciting development has been Python3's  asyncio  which is python's native approach to an event driven framework. This puts python in the spotlight for io-bound applications for which people would use node.js. Combing the Bokeh and asyncio allows building an interactive, realtime plotting application in less then 30 lines of code . I did not find any official documentation on how to do this so I decided to provide my own adapted from the official example here . I suggest to have a look at the official example to get a better understanding how the asyncio versi...