-
Hi! How are you? I was wondering if there is a way to put a bokeh application inside a layout (put_column, put_tabs, etc). I've seen from the bokeh documentation that it's possible to embed an app by running it on another port and then importing it, I want to know if there is a way to avoid this and instead be able to encapsulate an app. |
Beta Was this translation helpful? Give feedback.
Answered by
wang0618
Feb 19, 2022
Replies: 1 comment 1 reply
-
Yes, you can use from pywebio.output import *
from bokeh.io import output_notebook
from bokeh.plotting import figure, show
output_notebook(notebook_type='pywebio')
put_row([
put_code('text'),
put_scope('bokeh'),
])
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(title="Simple line example", x_axis_label='x', y_axis_label='y')
p.line(x, y, legend_label="Temp.", line_width=2)
with use_scope('bokeh'):
show(p)
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lpinilla
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can use
scope
:You will get: