New bokeh-static package
See original GitHub issueThis may not be the right place for this issue, but we can move it as appropriate. I was considering again today my annoyances with getting static plots (in particular so i can readily share static views of notebooks on github)
Additionally, firefox is now available as a conda package (https://github.com/conda-forge/firefox-feedstock). This will provide us much nicer rendering than what phantomjs spits out by default.
I’m imagining a workflow like:
conda install bokeh-export # install selenium, pillow, phantomjs, firefox, geckodriver
# In a notebook
from bokeh_export import (
initialize_driver,
notebook_show as show
)
initialize_driver('firefox') # set-up a single driver instance for faster rendering, pick your driver. use this to pass in options that are passed into a typical webdriver setup
p = figure().....
show(p) # does the work of Ipython.display.Image(export_png(p)) with driver globally scoped to be the one setup
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Running a Bokeh server
The Bokeh server executes the application code with every new connection and creates a new Bokeh document, syncing it to the browser.
Read more >Access static directory when using Bokeh as a library
Run with python main.py , but I cannot access the static directory /myapp/static . If I instead do: self.make_document(curdoc()). And start ...
Read more >Bokeh - Quick Guide - Tutorialspoint
Bokeh package Application class which is a lightweight factory for creating Bokeh Documents. A Document is a container for Bokeh Models to be...
Read more >Bokeh for Smarties - | notebook.community
Bokeh is a Python package that generates interactive plots for notebooks and web ... 'y0', source=source) # create another new plot and add...
Read more >Deploying Bokeh Apps — HoloViews v1.15.3
Unfortunately, a static approach like this cannot support any HoloViews object that ... Starting a server interactively and open it in a new...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We are definitely interested to look at kaleido, it’s just a matter of someone finding the time. Assuming it works as well as the complicated selenium process we have how, I’d be in favor of just taking it on as a hard dependency since (AFAIK) it is widely available on pip and conda.
@birdsarah @bryevdv You might have seen it already, but I just stumbled across the recently announced Kaleido library from plotly, which is a new library for static export of web-based graphics, with the specific goal to make this functionality widely available.
I am excited about this because I would love to see better support for this functionality across several libraries. While I don’t know how this would fit with bokeh technically, it might be something to consider instead of developing a separate library for static export. In the blog post linked above, they mention briefly how to integrate it with other libraries:
Also relevant for #9169