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

RGBA colorscale support for surface traces #4332

Closed
wants to merge 2 commits into from

Conversation

lucapinello
Copy link
Contributor

No description provided.

This works only if the global opacity is also specified and <1. To blend different surfaces, an opacity of 0.99 works great.
Fixed the per-element opacity on Surface plots
@archmoj
Copy link
Contributor

archmoj commented Nov 5, 2019

cc: #4331

@etpinard
Copy link
Contributor

@archmoj What's your take on this?

Sounds like we could both honour the alpha channel in colorscale[i] = [255, 0, 0, alpha] items AND implement opacityscale in surface traces? I worry about poor rendering performance, but it sounds like we could enable both.

@etpinard
Copy link
Contributor

@lucapinello could you share the data and layout settings you used to generate this graph

image

from #4331 (comment)

@etpinard
Copy link
Contributor

This PR essentially implements #4120

@archmoj
Copy link
Contributor

archmoj commented Nov 18, 2019

Ranges needed for opacity can be very from those of color channels.
I'd vote for investing time on implementing opaityscale and possibly opacitybar.

@etpinard
Copy link
Contributor

@archmoj ok if we rename this PR RGBA colorscale support for surface traces?

This implementation isn't per-element, it's per colorscale step item.

@archmoj archmoj changed the title Fixed the per-element opacity on Surface plots RGBA colorscale support for surface traces Nov 18, 2019
@archmoj
Copy link
Contributor

archmoj commented Nov 18, 2019

@archmoj ok if we rename this PR RGBA colorscale support for surface traces?

This implementation isn't per-element, it's per colorscale step item.

Renamed. Thanks!

@lucapinello
Copy link
Contributor Author

@etpinard sure thing: plotly/plotly.py#1859

@archmoj
Copy link
Contributor

archmoj commented Jan 10, 2020

Closing this PR in regard to implementation of opacityscale in #4480.

@archmoj archmoj closed this Jan 10, 2020
@etpinard
Copy link
Contributor

@archmoj I don't understand why you closed this PR.

To me it is a nice complement to opacityscale and it makes surface colorscale more on-par with other (mainly used for SVG traces) colorscales in the library.

@archmoj
Copy link
Contributor

archmoj commented Jan 27, 2020

@etpinard you are right.
1st - I thought colorbar won't be rendered with transparent colors. But it looks OK e.g. this treemap demo appear to work!
2nd - We need to patch gl-surface and other gl-vis modules to enable transparency without alpha 0.99 hack.
I re-open this PR for now; but I suggest continue working on it after #4480 is merged.

@archmoj archmoj reopened this Jan 27, 2020
@etpinard
Copy link
Contributor

I re-open this PR for now; but I suggest continue working on it after #4480 is merged.

Yes, that's fine!

@archmoj
Copy link
Contributor

archmoj commented Sep 25, 2020

Closing not that #5166 is open.

@archmoj archmoj closed this Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants