>
> Note that when I try to use Holoviews with Bokeh, I get this error:
>
> RuntimeError: Neither firefox and geckodriver nor a variant of chromium
> browser and chromedriver are available on system PATH. You can install the
> former with 'conda install -c conda-forge firefox geckodriver'.
>
> HV uses a headless browser to render the Bokeh output and (by taking a
> screenshot) render it to an image. pip couldn't find these drivers. I
> thought they were on Anaconda, but I don't use Anaconda. It's ironic
> because hv actually wants to use the same QT chrome widget we have on Leo,
> but it needs to import its own packaging. This is why I used matplotlib
> for rendering, and didn't output a live interactive graph, with holoviews.
> I thought that the geckodriver package was available via Anaconda. But
> using it would leave out all those Leo users that don't run Anaconda.
>
I discovered how to use Bokeh in Holoviews without needing that
geckodriver. If you write the actual interactive output - instead of a png
file - you don't even need a renderer. You can just embed the interactive
html output directly.
Here is the revised code for RsT rendering in VR3:
@language python
import holoviews as hv
hv.extension('bokeh')
xs = range(-10,11)
ys = [100-el**2 for el in xs]
curve = hv.Curve((xs, ys))
hv.save(curve, 'curve.html', backend='bokeh')
@language rest
Here is the resulting interactive graph:
.. raw:: html
:file: curve.html
If you change the extension and backend to 'matplotlib', you get a static
graph instead of an interactive plot.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/f8ea767b-178e-463c-ade7-979c0206fcd6%40googlegroups.com.