WebGL is not supported (even though its enabled)

Hi

I am trying to use plot.ly to create an interactive 3d graph. The entire document is here.

However, in my local notebook chrome browser, I most often get “webgl is not supported”. It is latest chrome and webgl is indeed enabled. I also checked the link it says to go to. It is enabled. why I still get this error?

2018-10-23_16h50_08

In my same browser, I could view the nbviewer link I shared here, and in that, the graph is appearing fine. However, as a notebook, in my local browser, some how it says “webgl not supported”.

Hi @parthi2929,

Thanks for including the example (Really nice notebook BTW!). It is working on my local chrome and firefox browsers, so it probably has something to do with the interaction between Plotly.js and your browser.

Do you have the same problem with this example?: https://codepen.io/plotly/pen/MaxrwW

If so, could you open an issue with the plotly.js project (https://github.com/plotly/plotly.js/) that includes this CodePen example, your browser and OS version information, and any errors that show up in the Chrome JavaScript console when you load the page (See https://developers.google.com/web/tools/chrome-devtools/console/)?

Thanks!
-Jon

Hi

yeah these are working. What I meant was, already generated graphs are working fine. But when I run the notebook to generate graph, I some times get above webgl error even though my browser perfeectly supports it as I can see other plotly graphs very fine. I do not remember seeing any error on developer panel but if I do I will revert with those details. Please analyze scenario where plotly will not generate the graph (esp via python notebook) and instead throw webgl even when browser is supporting it.

Hi @parthi2929,

Could you try to reproduce the error when saving the plot to a standalone html file using plotly.offline.plot? This would rule out any interactions with the Jupyter Notebook.

Either way, double check the JavaScript console in case there are any clues there.

-Jon

Hi, I’m having exactly this problem. I suppose it happens when a scatter has to many points to render. Usually it is working, and it just crash after I move or rotate the camera a little.
It seems, however, that it doesn’t crash with the exported html version.

Same issue here: on Jupyter Lab 1.0.0, px.scatter_3d with any number of data points results in the error “WebGL is not supported”. But exporting the same notebook (with the error) to HTML, and opening it in a new tab - presents the scatter plot just fine, including rotations and zoom.
For instance, this occurs with plotly tutorial’s code:

iris = px.data.iris()
fig = px.scatter_3d(iris, x='sepal_length', y='sepal_width', z='petal_width',
              color='species')
fig.show()

I’m facing same problem in Plotly.js while using IE-11 . Using Scatter-3D, it runs fine when I do it locally , but when I’m using from server , it moans . Although, I’m not sure its local vs Server thing , but it should be running everytime , if its running once .

Hi All,
I am also facing same issue while trying to render a surface chart using using typescript and react. While the same chart shows up fine with react and Javascript in browser.

I am getting this warning in console –
“WARN: webgl setup failed possibly due to enabling preserveDrawingBuffer config. The device may not be supported by is-mobile module! Inverting preserveDrawingBuffer option in second attempt to create webgl scene.”

Any help or suggestion is appreciable.

I am getting the same “WebGL is not supported” message in my Chrome browser on Linux Mint with 3GB of memory using the very latest Plotly version available via Anaconda. In my case I’m plotting a TON of scatterplot markers (4200+). However when I do that same task on my Mac with 8GB of memory it’s not problem at all.

Same issue here with chrome on Linux (Ubuntu 16) when creating a 3D scatter plot with ~300k points. I can re-draw the plot two-three times without problems (zooming/rotating etc is completely lag-free once it’s loaded!) but after that I get the same “WebGL is not supported…” issue and have to refresh the browser and restart the notebook to make it work again which is quite frustrating.

I’m guessing old figures might not be cleared properly and eventually clogs up the browser?

Edit: looks like the problem goes away if I just plot every 1 out of 10 points

Plotly states on its webiste:

The default rendermode is "auto", in which case Plotly Express will automatically set rendermode="webgl" if the input data is more than 1,000 rows long. If WebGL acceleration is not desired in this case, rendermode can be forced to "svg" for vectorized, if slower, rendering. (Webgl vs svg in Python)

So what I did is change the render mode

px.line(df, ..., render_mode='svg')