![]() When you embed a bokeh server app in the notebook, as you have done above, that process is the IPython kernel. Real Python code callbacks require a live, running Python interpreter process. It is not possible for a standalone HTML document to run real Python code, because browsers have no ability whatsoever to run Python code. You have created a Bokeh server application, with real Python code callbacks. What you are asking for is not possible, at least not as I understand your question. Hope anybody is able to help me out with this. RuntimeError: no display hook installed for notebook type None If I change the output_notebook() to output_file('tryout.html'), it givesme the following error, which I dont understand and could find a solution for as well: N_select = Slider(start = 2, end = 20, step = 1, value = 2, title = 'number of points',width=700)Ĭontrols = WidgetBox(N_select,data_table) New_src, new_src2 = make_dataset(N_select.value) Return ColumnDataSource(data),ColumnDataSource(dataMean) # Now the same plot, but fitted with a slider widget P.circle(source=src1,y='y',x='x',color='green')ĬolumnsT = [TableColumn(field="mean", title="mean"),ĭata_table = DataTable(source=src2, columns=columnsT, width=400, height=400) Title = 'Test case',x_axis_label = 'x', y_axis_label = 'y') P = figure(plot_width = 700, plot_height = 400, import numpy as npįrom bokeh.io import save, curdoc,output_file ,show, output_notebook, push_notebookįrom otting import figure, gridplotįrom bokeh.models import ColumnDataSource, Panelįrom import Slider, Tabs, DataTable, TableColumnįrom bokeh.layouts import layout, WidgetBoxįrom import FunctionHandlerįrom bokeh.application import Applicationĭata = pd.DataFrame(np.random.random(),columns=)ĭataMean = pd.DataFrame(,columns=) ![]() How do I get the interactive plots with widgets working in a standalone HTML?īelow you can find a working example in Jupyter Notebook with Bokeh 13.0 installed. When using the Jupyter NB "download to" HTML function located in the toolbar, everything but the interactive Bokeh plots export well, also the static Bokeh plots (static plots are 'interactive' as well, but the underlying data does not change) I'm looking for a way to export my Jupyter Notebook containing interactive Bokeh plots with widgets to standalone HTML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |