I have an offline 3D scatter plot where I’m using points to define the corners of a cube and the surface axis and surface color options to fill in the sides one surface at a time so it appears like a solid cube. I’d like to be able to toggle these surfaces on or off by clicking on the legend, but this doesn’t seem to be working. My next option was to use an rgba color model to add transparency to the surface color, but that didn’t seem to work either. I’d like to know if I have an error somewhere, or if these features aren’t intended to be used like this.
Looks like you uncovered a bug in the scatter3d
traces with surfaceaxis
turned on.
The bug is now file in plotly.js, please subscribe to https://github.com/plotly/plotly.js/issues/399 for the latest information.
Thanks!
Thanks, will this fix the rgba color model (or opacity input) to add transparency to the surface color also?
@tfg250 can you elaborate (ideally with a reproducible example) on the unwanted rgba behavior you’re seeing.
The surfacecolor
attribute seems to accept rbga
just fine at the moment: http://codepen.io/etpinard/pen/oxoRLJ
I’m trying to make the surfaces somewhat transparent. Neither the “opacity” input or the last term of the rgba entry seems to work in your example.
@tfg250 My mistake. I thought that setting surfacecolor
with throwing errors. But, you’re right, true 3D opacity isn’t passed in the surface object at the moment. I’m working on a fix at the moment. Thanks for posting!