Skip to content
Advertisement

Plotly.js 3D scatter plot is just black

This is something that has recently broken. Previously, I was getting normal plots when running the exact same code however now the plot is just a black screen. (Pictured Below) plotly

I am not sure what changed. I tried reverting to an older version of plotly but that did not fix it. I do not even know where to begin debugging this. I saw another question with similar problem but their solution of clearing the cache did not fix my issue. As you can see in the photo the only problem is the actual plot canvas as the colorbar still functions.

Here are the relevant sections of my code:

JavaScript

Advertisement

Answer

You sure your CSS styles do not break anything? I’m not sure how it’s supposed to look, but definitely it’s not all black:

JavaScript
JavaScript
Advertisement