plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Plotly fails when using "scattergl" and value greater than 2^24 [Only on M1]

Open ravikirankhareedi opened this issue 3 years ago • 1 comments

When plotting using Plotly.newplot() and type scattergl on M1 machine, the plotting fails if the value of x-axis is greater than 2^24. Example:

var data = [
  {
    x: [16777217],
    y: [1],
    type: "scattergl",
  }
];

Plotly.newPlot('myDiv', data);

Screen Shot 2022-03-01 at 9 27 12 PM

The data gets plotted on the margin which cannot be zoomed/panned. (16777217 is 2^24 + 1) Attached screen shot. The issue only happens on M1 machine. On Intel hardware everything works well.

ravikirankhareedi avatar Mar 02 '22 05:03 ravikirankhareedi

The same issue here. This issue happens only when using the WebGL mode. The plot becomes normal when manually switched back to the SVG mode.

image image

c-lyu avatar Jul 05 '22 14:07 c-lyu

This reproduces in both Chrome and Safari on M1 devices, despite them using different WebGL backends. Could plotly be sending different WebGL commands based on the architecture?

grorg avatar Oct 05 '22 02:10 grorg

Or is it regl?

grorg avatar Oct 05 '22 03:10 grorg