On Tuesday, March 24, 2020 at 2:12:39 AM UTC-4, Edward K. Ream wrote:
>
> On Mon, Mar 23, 2020 at 7:56 PM Thomas Passin <[email protected] 
> <javascript:>> wrote:
>
> > Here's a simple Bokeh program that VR3 executes: [snip]
>
> Thanks for this. Looks like holoviews/bokeh are just what we need.
>

I've been looking at them a little more.  It turns out that using Holoviews 
with the matplotlib back end, it is easy to save a plot and show in in a 
Leo node.  Using the Bokeh backend, or using Bokeh itself, it's nearly 
impossible. 

The attached png file is a screen shot showing my little Holoview program 
creating an image and embedding it in the rendered result.

The reason it's very hard to do with the Bokeh back end is that Bokeh never 
actually creates an image file.  It creates an HTML file with javascript 
instructions for drawing the images.  The only way they have come up with 
to get an image out of it is to open a headless browser, have the browser 
paint the invisible screen (or it could be done with the visible browser, 
perhaps), then programmatically do a screen shot, and save the screen shot 
as a png or svg file.  And this takes a long time (I read someone's post 
where he said it took 15 seconds).  And you have to install certain 
dependencies, one of which I couldn't even find with pip (it's apparently 
available from Conda, though, if you have a Conda installation of Python). 

In Holoview, doing your calculations and making the plot can use either 
Matplotlib or Bokeh back ends interchangeably, so just use matplotlib and 
everything will be way easier.

-- 
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/39950f0d-061b-44cd-acbf-dc5c33907613%40googlegroups.com.

Reply via email to