Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixel value when I click on an image #557

Closed
orkun opened this issue Jan 28, 2018 · 2 comments
Closed

pixel value when I click on an image #557

orkun opened this issue Jan 28, 2018 · 2 comments

Comments

@orkun
Copy link

orkun commented Jan 28, 2018

Is it possible to get pixel value when I click on an image?
Is there any example? or how is it done?
regards

@jbednar
Copy link
Member

jbednar commented Jan 29, 2018

Yes and no. No, in that Bokeh does not yet support hover for 2D objects. We keep meaning to address that, but it keeps getting shunted aside for higher-priority work, because it's trickily bound up into other work that's already underway. Once it's done, you'll be able to hover over the image even in a pure HTML file (with no Python process running), but I can't promise when that will be ready.

Meanwhile, you can get the 2D coordinates of a mouse click as shown in the last cell of our Landsat example. That approach requires a live Python server (and thus won't work in the actual HTML file linked there), but once you get the coordinates you should be able to look up the value from the datashaded array manually.

@jbednar
Copy link
Member

jbednar commented May 18, 2018

Bokeh now supports image hover, as of bokeh 0.12.16, and it's supported by HoloViews 1.10.4 and GeoViews 1.5, so you should be able to use those libraries to show hover information for any datashaded plot. See the "large data" sections of holoviews.org and geoviews.org.

@jbednar jbednar closed this as completed May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants