Tap Tool help

Hi all,
I’m starting to work now with bokeh and it’s great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn’t understand how to customize it…

Thanks

Hi Manachem,

This is being added in a current PR:

And should be in the upcoming 0.8 release in a few weeks (or perhaps a dev build/rc before then).

Thanks,

Bryan

···

On Wednesday, February 4, 2015 at 2:55:28 AM UTC-6, Menachem Shafran wrote:

Hi all,
I’m starting to work now with bokeh and it’s great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn’t understand how to customize it…

Thanks

Hi All,

I am trying to work with the GMapPlot to display the metadata of a project I am working on.

It involves mapping a large number (300,000 circles). I have been trying to use the Charts.GMapPlot, following some examples and some trial and error.

Firstly, I get a bit of (seemingly) buggy behaviour with the plot. After I produce it I often need to save the notebook (with the figure inline) and re-open it to view the results displayed correctly (otherwise the map is almost entirely outside of the plot frame, which itself is blank). Apart from that, I tried adding some tools to the plot, but I get some behaviour which isn’t quite optimal, and some things that also seem buggy. Any ideas how I can get around it?

  1. Reset tool: currently this resets the lon/lat (x,y) values to 0.0, and 0.0, at original zoom level: would be good to over-ride these values to the originally specified lat. lon. set in GMapOptions.

  2. Box Zoom Tool: this appears to just centre the plot over the centre point of the box zoom, without changing the zoom level of the map.

  3. Pan bug? When I pan, the glyphs (in my case circles), can become dissociated from their correct map location.

  4. Color scale: Is it possible to add a colour scale legend relating to the colours assigned to my circle glyphs?

You can see my example and code in the below notebook:

http://nbviewer.ipython.org/github/benlaken/ECCO/blob/master/iPlots_xyGMap.ipynb

If you want to play with the code directly, it (and the dependency file) is in my rather messy repo at https://github.com/benlaken/ECCO

Also, I am new to using Bokeh, so if you see a better way for me to do something, please let me know.

Thanks,

—Benjamin

···

On 10 Feb 2015, at 15:55, Bryan Van de ven [email protected] wrote:

Hi Manachem,

This is being added in a current PR:

https://github.com/bokeh/bokeh/pull/1854

And should be in the upcoming 0.8 release in a few weeks (or perhaps a dev build/rc before then).

Thanks,

Bryan

On Wednesday, February 4, 2015 at 2:55:28 AM UTC-6, Menachem Shafran wrote:

Hi all,
I’m starting to work now with bokeh and it’s great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn’t understand how to customize it…

Thanks

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/986cae4d-d34b-4802-96bd-2801641ca8ee%40continuum.io.

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

Hello,

I would be extremely grateful for any tips on how to access the indices of TapTool-selected points in client-side JS. It looks like tap tool actions are in development, but it would be great to have a workaround in the meantime.

Thanks in advance,

Stephen

···

On Tuesday, February 10, 2015 at 6:55:29 AM UTC-8, Bryan Van de ven wrote:

Hi Manachem,

This is being added in a current PR:

https://github.com/bokeh/bokeh/pull/1854

And should be in the upcoming 0.8 release in a few weeks (or perhaps a dev build/rc before then).

Thanks,

Bryan

On Wednesday, February 4, 2015 at 2:55:28 AM UTC-6, Menachem Shafran wrote:

Hi all,
I’m starting to work now with bokeh and it’s great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn’t understand how to customize it…

Thanks

Hi Stephen,

Indices of selected points are stored on the data sources. If you have a Bokeh renderer model you should be able

  renderer.get('data_source')

Additionally, in case it is helpful, renderers are stored on the plot:

  plot.get('renderers')

Thanks,

Bryan

···

On Apr 14, 2015, at 7:02 PM, [email protected] wrote:

Hello,

I would be extremely grateful for any tips on how to access the indices of TapTool-selected points in client-side JS. It looks like tap tool actions are in development, but it would be great to have a workaround in the meantime.

Thanks in advance,

Stephen

On Tuesday, February 10, 2015 at 6:55:29 AM UTC-8, Bryan Van de ven wrote:
Hi Manachem,

This is being added in a current PR:

    Meta-PR for client-side interactive features, formatting, etc. by mattpap · Pull Request #1854 · bokeh/bokeh · GitHub

And should be in the upcoming 0.8 release in a few weeks (or perhaps a dev build/rc before then).

Thanks,

Bryan

On Wednesday, February 4, 2015 at 2:55:28 AM UTC-6, Menachem Shafran wrote:
Hi all,
I'm starting to work now with bokeh and it's great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn't understand how to customize it..
Thanks

--
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/44d46022-0ca5-45b8-9b96-dbcd31b6616f%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thank you! I’m on track now. I found selected indices using:
Bokeh.ColumnDataSource.Collection.models[0].attributes.selected
– I neglected to mention that I’m using the ‘components’ function to embed a plot, with single data source, in a Flask app.

My goal is to have a page element update to show information about the selected point(s). I’ll add a button which triggers the update (‘select a point then click the button’), but if there’s a nicer way to do this I’d love to hear it.

Many thanks,
Stephen

p.s. I am in love with Bokeh. Thanks for this incredible tool!

···

On Thursday, April 16, 2015 at 7:50:08 AM UTC-7, Bryan Van de ven wrote:

Hi Stephen,

Indices of selected points are stored on the data sources. If you have a Bokeh renderer model you should be able

    renderer.get('data_source')

Additionally, in case it is helpful, renderers are stored on the plot:

    plot.get('renderers')

Thanks,

Bryan

On Apr 14, 2015, at 7:02 PM, [email protected] wrote:

Hello,

I would be extremely grateful for any tips on how to access the indices of TapTool-selected points in client-side JS. It looks like tap tool actions are in development, but it would be great to have a workaround in the meantime.

Thanks in advance,

Stephen

On Tuesday, February 10, 2015 at 6:55:29 AM UTC-8, Bryan Van de ven wrote:

Hi Manachem,

This is being added in a current PR:

[https://github.com/bokeh/bokeh/pull/1854](https://github.com/bokeh/bokeh/pull/1854)

And should be in the upcoming 0.8 release in a few weeks (or perhaps a dev build/rc before then).

Thanks,

Bryan

On Wednesday, February 4, 2015 at 2:55:28 AM UTC-6, Menachem Shafran wrote:

Hi all,

I’m starting to work now with bokeh and it’s great but I need to create a plot where if someone clicks on a point on the graph it will give him additional details.

Can it be done via the TapTool? couldn’t understand how to customize it…

Thanks


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/44d46022-0ca5-45b8-9b96-dbcd31b6616f%40continuum.io.

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