Bokeh¶
Simple example:
import numpy as np
from bokeh.plotting import figure
from flexx import app, ui, event
x = np.linspace(0, 6, 50)
p1 = figure()
p1.line(x, np.sin(x))
p2 = figure()
p2.line(x, np.cos(x))
class Example(ui.Widget):
    def init(self):
        with ui.BoxPanel():
            ui.BokehWidget(plot=p1)
            ui.BokehWidget(plot=p2)
- 
class 
flexx.ui.BokehWidget(*init_args, **kwargs)¶ Inherits from:
WidgetA widget that shows a Bokeh plot object.
For Bokeh 0.12 and up. The plot’s
sizing_modeproperty is set tostretch_bothunless it was set to something other thanfixed. Other responsive modes are ‘scale_width’, ‘scale_height’ and ‘scale_both`, which all keep aspect ratio while being responsive in a certain direction.- 
plot¶ property – The Bokeh plot object to display. In JS, this prop provides the corresponding backbone model.
-