For bokeh-0.11.1 :
Basically, you need to run a python application on a bokeh server. Then everyone can connect to the server and view the graph in real time.
First write your program. Use this code, for example:
# myplot.py from bokeh.plotting import figure, curdoc from bokeh.driving import linear import random p = figure(plot_width=400, plot_height=400) r1 = p.line([], [], color="firebrick", line_width=2) r2 = p.line([], [], color="navy", line_width=2) ds1 = r1.data_source ds2 = r2.data_source @linear() def update(step): ds1.data['x'].append(step) ds1.data['y'].append(random.randint(0,100)) ds2.data['x'].append(step) ds2.data['y'].append(random.randint(0,100)) ds1.trigger('data', ds1.data, ds1.data) ds2.trigger('data', ds2.data, ds2.data) curdoc().add_root(p)
Then start the server from the command line using your program:
C:\>bokeh serve --show myplot.py
This will open a browser with your real time chart.
See the bokeh documentation for details.
source share