[FEATURE] #12695
Replies: 1 comment 1 reply
-
Up front: moving this to a dev discussion, because I think there is realistically not any chance that this would be developed in the main bokeh repo. Just as with the MPL tool, this would be better as a separately developed project. If that happened and there was interest and commitment to long-term maintenance, we could perhaps discuss including under the Bokeh GH org in the future. I should also describe at a very high level what a solution might look like for Bokeh, and also why it is substantially more complicated than the MPL case. In the MPL case, actual base64-encoded images are stored as string data in the notebook output cells. It only takes a trivial few lines of code to un-unencode those strings and write them to disk as-is. The Bokeh case is not like that, at all. Bokeh output is a set of instruction that have to be executed by a JavaScript runtime. There is no way to generate Bokeh images without running JS code through a browser JS engine. Bokeh can generate PNGs by driving a headless browser (chrome or firefox) using seleniumm, and, more or less, taking a screenshot. Any analogous tool for pulling Bokeh content out of notebooks would have to do the same. Extract the BokehJS JSON output, feed it to a headless browser, to generate a plot in the headless browser, and then capture an image. That's more work, but more importantly, a lot more dependencies to manage. Also up front: I can't speak for any other core devs in @bokeh/core but I am not personally interested in spending any time pursuing this directly, but I'm happy to try to offer technical guidance to anyone who does. |
Beta Was this translation helpful? Give feedback.
-
Problem description
i often do exploratory analysis with bokeh in many multiple notebooks and not always save the output.
Feature description
i wish there was a way to programatically extract this plots into either static images of interactive htmls so that i can review them
Potential alternatives
there are options for doing this with matplotlib. see for example:
https://github.com/damienmarlier51/Junix
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions