Вот, пожалуйста.Запуск с bokeh serve --show app.py
(проверено на Bokeh v1.0.4)
from bokeh.models import ColumnDataSource, Toggle, Column
from bokeh.plotting import figure, curdoc
from datetime import datetime
import random
source = ColumnDataSource(dict(time = [datetime.now()], value = [random.randint(5, 10)]))
plot = figure(plot_width = 1200, x_axis_type = 'datetime', tools = 'pan,box_select,crosshair,reset,save,wheel_zoom')
plot.line(x = 'time', y = 'value', line_color = 'black', source = source)
toggle = Toggle(label = "Toggle", button_type = "success")
def update():
if toggle.active:
source.stream(dict(time = [datetime.now()], value = [random.randint(5, 10)]))
curdoc().add_root(Column(plot, toggle))
curdoc().add_periodic_callback(update, 1000)
Результат: