-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
3d Surface bug in Python? A custom colorscale defined with rgba values ignores the alpha specification #1859
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
Comments
This seems broken also in the javascript version. The colorbar shows the right transparency but the surface does not, I created a codepen here: https://codepen.io/lucapinello/pen/gOOoeRd |
@lucapinello Plotly doesn't work (and it has never worked ) with a colorscale having rgba colors in its definition. As you noticed it acccepts a rgba based colorscale, but retains only the rgb elements. The transparency is set only by the opacity value. |
Wow thanks for the super quick reply! Any hope this will be supported in the future? Or where to look to extend this function to propagate the transparency? I am trying to overlay different surfaces (all identical) to color different regions of a single surface. Some regions may overlap so I was thinking to have some per point alpha to control this better. I tried the global opacity, unfortunately, it doesn't work well for this since the final result will depend on the plotting order. Any other way to accomplish this? Anyway thanks a lot for this amazing library! |
You can post a feature request on the plotly.js repo. |
Thanks for the feedback @lucapinello ! I've gone ahead and created plotly/plotly.js#4331 to track this request, as it would have to be implemented in the JS layer first before being available in the Python layer of the Plotly stack :) |
Yes, this makes perfect sense. Thank you so much @nicolaskruchten ! |
Hi There!
I am trying to create a surface with surfacecolor and a custom colorscale to set a per point transparency.
The global opacity is working well, however the per point opacity specified in a custom colorscale with the rga definitions are ignored.
This is what I am doing:
I created a jupyter notebook so you can reproduce the error
The text was updated successfully, but these errors were encountered: