Integrating Bokeh plots with other HTML/JS

Hi all,

I’m brand new to Bokeh but enjoying the package very much! I have a naive question, looking for basic pointers on where to get started efficiently.

I would like to make a clickable brain that, when a part is selected, shows a Bokeh plot. Here is a non-Bokeh (javascript) demo of what I want to do:

http://roygbiv.mindboggle.info/

I have two questions:

  1. Is there documentation on how to use the Bokeh object framework to create new plot types and interact with appropriate objects properly? I’d want to do that to migrate the creation of the brain visualization from a mix of manual work + JS to Python.

  2. If I don’t do that migration, is there a recommended way to dump Bokeh blobs to string? I saw this issue, wondering if this is still the recommended way to do it?

Thanks!
Ben

I think this is what you want? https://github.com/bokeh/bokeh/pull/2800#event-421148779

···

On Thursday, October 1, 2015 at 6:45:08 PM UTC-4, Ben Cipollini wrote:

Hi all,

I’m brand new to Bokeh but enjoying the package very much! I have a naive question, looking for basic pointers on where to get started efficiently.

I would like to make a clickable brain that, when a part is selected, shows a Bokeh plot. Here is a non-Bokeh (javascript) demo of what I want to do:

http://roygbiv.mindboggle.info/

I have two questions:

  1. Is there documentation on how to use the Bokeh object framework to create new plot types and interact with appropriate objects properly? I’d want to do that to migrate the creation of the brain visualization from a mix of manual work + JS to Python.
  1. If I don’t do that migration, is there a recommended way to dump Bokeh blobs to string? I saw this issue, wondering if this is still the recommended way to do it?

https://github.com/bokeh/bokeh/issues/373#issuecomment-40215955

Thanks!
Ben

Thanks for the pointer, that looks promising. I was able to install bokeh from sources to try this out.

Is there documentation for how to build these? I see that there’s a custom glyph example; I can try to go from there, but some docs to get things started would really help too. I checked PR #2800, and I didn’t see any .rst file added to explain this though.

Thanks!

···

On Fri, Oct 2, 2015 at 8:25 AM, Jtemp [email protected] wrote:

I think this is what you want? https://github.com/bokeh/bokeh/pull/2800#event-421148779

On Thursday, October 1, 2015 at 6:45:08 PM UTC-4, Ben Cipollini wrote:

Hi all,

I’m brand new to Bokeh but enjoying the package very much! I have a naive question, looking for basic pointers on where to get started efficiently.

I would like to make a clickable brain that, when a part is selected, shows a Bokeh plot. Here is a non-Bokeh (javascript) demo of what I want to do:

http://roygbiv.mindboggle.info/

I have two questions:

  1. Is there documentation on how to use the Bokeh object framework to create new plot types and interact with appropriate objects properly? I’d want to do that to migrate the creation of the brain visualization from a mix of manual work + JS to Python.
  1. If I don’t do that migration, is there a recommended way to dump Bokeh blobs to string? I saw this issue, wondering if this is still the recommended way to do it?

https://github.com/bokeh/bokeh/issues/373#issuecomment-40215955

Thanks!
Ben

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/37ac72d3-e282-4e57-984c-4693b1d54dde%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

OK, I read through quite a bit of the bokeh documentation, I think I understand better.

My question: are there docs on how to trigger behaviors and register for event call-backs from BokehJS / bokeh plots?

What I have is a 3D surface plot of the brain that I’d like to connect to bokeh plots (image below). For example, if I click on an area of the brain I want to show an interactive scatter plot related to that area. Or, if I click on an interactive scatter plot across the whole brain, I want to select the corresponding area in the brain.

I was hoping to actually generate the plot in bokeh natively, and use the interaction tools to do the interactions. Reading the docs, I think the easier way would be to use the embedding tools–define my plot and html outside of bokeh, and import the bokeh resources and generated HTML into the plot.

To do that, I’ll need to understand how to interact with bokeh objects in JS. I saw the BokehJS reference documentation, but I didn’t see anything about the underlying event structure.

Thanks!

Ben

···

On Fri, Oct 2, 2015 at 10:23 PM, Ben Cipollini [email protected] wrote:

Thanks for the pointer, that looks promising. I was able to install bokeh from sources to try this out.

Is there documentation for how to build these? I see that there’s a custom glyph example; I can try to go from there, but some docs to get things started would really help too. I checked PR #2800, and I didn’t see any .rst file added to explain this though.

Thanks!

On Fri, Oct 2, 2015 at 8:25 AM, Jtemp [email protected] wrote:

I think this is what you want? https://github.com/bokeh/bokeh/pull/2800#event-421148779

On Thursday, October 1, 2015 at 6:45:08 PM UTC-4, Ben Cipollini wrote:

Hi all,

I’m brand new to Bokeh but enjoying the package very much! I have a naive question, looking for basic pointers on where to get started efficiently.

I would like to make a clickable brain that, when a part is selected, shows a Bokeh plot. Here is a non-Bokeh (javascript) demo of what I want to do:

http://roygbiv.mindboggle.info/

I have two questions:

  1. Is there documentation on how to use the Bokeh object framework to create new plot types and interact with appropriate objects properly? I’d want to do that to migrate the creation of the brain visualization from a mix of manual work + JS to Python.
  1. If I don’t do that migration, is there a recommended way to dump Bokeh blobs to string? I saw this issue, wondering if this is still the recommended way to do it?

https://github.com/bokeh/bokeh/issues/373#issuecomment-40215955

Thanks!
Ben

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/37ac72d3-e282-4e57-984c-4693b1d54dde%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.