On Monday, March 23, 2020 at 8:50:16 PM UTC-4, Thomas Passin wrote:

> On Monday, March 23, 2020 at 9:11:04 AM UTC-4, Edward K. Ream wrote:
>>
>>
>> The VR (and VR3?) plugins should be able to support Bokeh fairly easily.
>>
>
> VR3 already does in this in a sense - you can run a node with a Bokeh 
> program and output a plot that will render in the system browser.   If you 
> want to embed the graph into a Leo node, a la Jupyter notebooks, that will 
> take some thought to work out.  I have been mulling this over for a while, 
> but not very seriously as yet.
>

Here's a simple Bokeh program that VR3 executes:

# Following https://github.com/pyviz/holoviews/issues/1819 for how to plot 
# without using ipython/Jupyter

import holoviews as hv
import holoviews.util
hv.extension('bokeh')
# hv.extension('matplotlib') # Alternate back end

# from bokeh.io import output_file, save  # Could save to a file, 
# then load into a node.

from bokeh.io import show

xs = range(-10,11)
ys = [100-el**2 for el in xs]

curve = hv.Curve((xs, ys))

renderer = hv.renderer('bokeh')

# For saving to a file:
#renderer.save(curve, 'h1')

plot = renderer.get_plot(curve).state
show(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/912af973-1485-4a1f-b5b2-c430fdf48fbf%40googlegroups.com.

Reply via email to