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

@emryslda
Copy link

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

@philippjfr
Copy link
Member Author

@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 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

@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 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 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 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.

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hover tooltips gv.RGB does not work, return ???
4 participants