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

Ensure RGB hover is handled #3727

Merged
merged 2 commits into from May 20, 2019
Merged

Ensure RGB hover is handled #3727

merged 2 commits into from May 20, 2019

Conversation

@philippjfr
Copy link
Member

@philippjfr philippjfr commented May 20, 2019

Fixes holoviz/geoviews#331

@philippjfr philippjfr merged commit d2363a8 into master May 20, 2019
2 of 3 checks passed
@emryslda
Copy link

@emryslda emryslda commented May 21, 2019

@philippjfr I still have the problem. Can you see the RGB values instead?

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented May 21, 2019

@philippjfr I still have the problem. Can you see the RGB values instead?

You should see a single integer representing the int32 RGB value.

@emryslda
Copy link

@emryslda emryslda commented May 21, 2019

Right! Thank you very much!
Sorry if I ask again but could be possible to implement the RGB visualization singularly? Pointing the single value, It would be nice to see R G B separately, like for example R 255 G 25 B 10.

@philippjfr I still have the problem. Can you see the RGB values instead?

You should see a single integer representing the int32 RGB value.

@emryslda
Copy link

@emryslda emryslda commented May 29, 2019

@philippjfr Sorry but could be possible to extract the int32 value from the RGB as a matrix of values (with the same x,y of the image i mean)?

@cocoaaa
Copy link

@cocoaaa cocoaaa commented Jun 16, 2019

@emryslda It may be helpful to convert the RGB element to an Image element:

%%opts Image [tools=['hover']]
hvimg = hvrgb.to(hv.Image) # hover tool gives x,y,r,g,b values

However, I'm not sure why it changes the colormapping.. (@philippjfr)
image

@cocoaaa
Copy link

@cocoaaa cocoaaa commented Jun 16, 2019

@philippjfr The extents of the Image and RGB elements are also not correctly set to the limits of x, y grid. Is this is intended behavior?

@jbednar
Copy link
Member

@jbednar jbednar commented Jun 16, 2019

An hv.Image element has only a single plane of data, and so it's inherently monochromatic, with colors created by colormapping from the single value dimension into RGB space. An hv.RGB element doesn't do any colormapping, having separate R, G, and B channels directly determining the colors seen. So if you convert an RGB element into an Image element, you're losing the three channels, resulting in a single monochromatic channel. So converting to Image really isn't what you want here. It would be great to have a PR on bokeh making RGB hovering more useful, though.

@philippjfr philippjfr deleted the rgb_hover branch Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants