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)
open in new tab


class flexx.ui.BokehWidget(*init_args, **kwargs)

Inherits from: Widget

A widget that shows a Bokeh plot object.

For Bokeh 0.12 and up. The plot’s sizing_mode property is set to stretch_both unless it was set to something other than fixed. 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.