Closed fcollonval closed 3 years ago
What is push_notebook
? Is it something that should be fixed somewhere, to have the view updated?
Yes, Bokeh is not playing as nicely as bqplot or plotly.py 3.0. To update a previously created plot, you need to explicitly push the new properties through a handle.
Here is the relevant documentation.
So you are right. The view update process should be fixed in bokeh
. So I have opened an issue there.
Nota: I still think the ability to directly redirect the output in an side widget is interesting in the case where the same figure will be updated along side the execution of a notebook. It such case, updating the "regular" output in the notebook may even be a waste of ressources if it is hidden.
Are there any plans to merge this PR? I have a similar use case with bokeh, large plots that I'd prefer to show in a separate tab rather than inline.
Other than a rebase is there anything holding back this PR? It adds some really nice functionality to this extension.
The one thing is that maybe the example shouldn't use plotly as not everyone will have installed
Other than a rebase is there anything holding back this PR? It adds some really nice functionality to this extension.
I've added a few comments.
Note that you can also right click on any output and select "Create new view for output" to get a tab with that output. It won't be programmatic, but it will be a tab in the main area.
As a side note, I think an option like
anchor
could be a nice to have in the standardOutput
widget (in the context of JupyterLab).
Unfortunately, that would make the output widget very specific to JupyterLab.
Thanks for the review @jasongrout
I rebased this PR and made the modifications.
This should be good to go.
Hi @fcollonval would you mind rebasing one final time?
Hi @fcollonval would you mind rebasing one final time?
Done
I can't merge stuff here otherwise I would deal with this
Fixed! You can do stuff here too.
Thanks @fcollonval !
(And thanks jason for fixing merging rights :smile: )
We are using a lot bokeh for plots. Unfortunately in JupyterLab cloning the output view into a separate widgets is not working as expected. In particular when using
push_notebook
, only the view in the notebook is updated not the other view. So your sidecar project is really interesting. But to have a more flexible layout, I added an attributeanchor
that can beright
ormain
depending if the user wants the output in the right sidebar or in the main area.I also try to add the widget in the left sidebar. But in such case, the tab is non closable (I did not figure out why).
As a side note, I think an option like
anchor
could be a nice to have in the standardOutput
widget (in the context of JupyterLab).