-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-evaluate Bokeh in documentation Jupyter notebooks and compare with Plotly #3054
Comments
In Bokeh 3, the serialization to JSON has been reworked: if you want to plot your own container types (such as our We currently only call Bokeh from the notebooks in the documentation, but we advertise there to use it for interactive plotting in the Neuron python workflow. It is currently pinned to I got the feedback that interactive plotting is crucial to demonstrate in the notebooks, be it with Bokeh or with Plotly. That gives the following options:
I added option 2 in #3061, which removes the pin, and also the remaining Numpy pin. I'd say we can merge that for now, and come back to this if it turns out that registering a serialization function trips up the user too much. |
This isn't just a notebook issue. We give Bokeh code in the example for RangeVarPlot.plot and who knows where else. The following ought to just work: import bokeh.plotting as b
bg = b.Figure()
r.plot(bg, line_width=10)
b.show(bg) So instead of modifying the notebook to tell people to do extra things, is there any reason not to just have |
I thought about that, and I think that should work and indeed be cleaner, unless the user ends up reloading Bokeh somehow afterwards (or who knows how it gets reloaded), which would lead to a puzzling error. Not realizing what you said about EDIT: Changed "implicit" to "explicit" |
@kbvw noticed that
bokeh<3
is present in the documentation build and that newer versions of Bokeh serialize Neuron objects differently (i.e. fail to do so).We should see how much work would be involved to switch to
plotly
, and sort-of ensure that serialization works.The text was updated successfully, but these errors were encountered: