Skip to content

RGBA colorscale support for surface traces - #4332

Closed
lucapinello wants to merge 2 commits into
plotly:masterfrom
lucapinello:master
Closed

RGBA colorscale support for surface traces#4332
lucapinello wants to merge 2 commits into
plotly:masterfrom
lucapinello:master

Conversation

@lucapinello

Copy link
Copy Markdown
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
Copy Markdown
Contributor

cc: #4331

@etpinard

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

image

from #4331 (comment)

@etpinard

Copy link
Copy Markdown
Contributor

This PR essentially implements #4120

@archmoj

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

@archmojarchmoj changed the title Fixed the per-element opacity on Surface plotsRGBA colorscale support for surface tracesNov 18, 2019
@archmoj

Copy link
Copy Markdown
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.

Renamed. Thanks!

@lucapinello

Copy link
Copy Markdown
ContributorAuthor

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

@archmoj

Copy link
Copy Markdown
Contributor

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

@archmojarchmoj closed this Jan 10, 2020
@etpinard

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@etpinard you are right.
1st - I thought colorbar won't be rendered with transparent colors. But it looks OK e.g. this treemapdemo 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.

@archmojarchmoj reopened this Jan 27, 2020
@etpinard

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Closing not that #5166 is open.

@archmojarchmoj closed this Sep 25, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugsomething broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lucapinello@archmoj@etpinard