Including scattegl plot
Hello,
Do we know whether scattergl will be also included in plotly_express and if so if it in the imminent road map?
Cheers
For all the functions that generate trace types that support WebGL acceleration (px.scatter(), px.line(), px.scatter_polar(), px.line_polar()) you can pass a render_mode="webgl" argument to force that behaviour or render_mode="svg" to disable it. The default is "auto" which uses some heuristics to do the right thing :)
I tried the suggested approach and I do not see any benefit. Do we need to install or enable something before webgl can work?
OK, what kinds of "benefit" were you expecting that you didn't get? In general, scattergl is meant to look as close as possible to scatter so in principle you should see very little difference.
@nicolaskruchten thank you for looking into that.
I mean performance wise. I didn't mention that I am working on a jupyter notebook which becomes quite slow and non responsive even when I try render_mode='webgl'.
I tested both in Chrome and Firefox (both with latest versions)
Following the traditional approach using go.Scattergl on the exact same data, plots fast without any effects on the responsiveness of the notebook.
I checked the code and the constructor gets correctly instantiated as go.Scattergl https://github.com/plotly/plotly_express/blob/2d0482db751f1e815cc5890d7d992d60941d8e68/plotly_express/_core.py#L833-L835
so it's probably something wrong from my side..
Interesting. Can you share some sample code about how you're doing it the traditional way? Are you using plotly.offline.iplot?
You can test it here Cheers