Skip to content

3D Scatter transparency not activated by marker.color or marker.line.color as well as line.color and errorbars alpha channel #3492

Closed
@jonmmease

Description

@jonmmease

Originally reported in plotly/plotly.py#1416.

The alpha channel of rgba colors seems to be respected by scatter3d, but only if the opacity property is set to something less than 1.

CodePen: https://codepen.io/jonmmease/pen/OdRbdL

var trace1 = {
  x: [0, 1.1, 2.2], 
  y: [0, 1, 2], 
  z: [0, 1, 2], 
  mode: 'markers',
  marker: {
    size: 20,
    color: ['rgba(255, 0, 0, 0.9)',
            'rgba(255, 0, 0, 0.5)',
            'rgba(217, 0, 0, 0.1)'],
    line: {
    },
    opacity: 1.0
    // opacity: 0.99
  },
  type: 'scatter3d'
};

var data = [trace1];
var layout = {
      margin: {
        l: 0,
        r: 0,
        b: 0,
        t: 0
  }};
Plotly.newPlot('myDiv', data, layout, {showSendToCloud: true});

With trace1.opacity: 1.0
newplot-3

With trace1.opacity: 0.99
newplot-4

Could the opacity<1 logic be activated automatically if marker.color includes rgba colors with alpha < 255? Or maybe just if there are any colors specified as rgba period.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions