Skip to content

Commit b9eee35

Browse files
tweaks
1 parent 39f872f commit b9eee35

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

doc/python/webgl-vs-svg.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jupyter:
3838

3939
`plotly` figures are rendered by web browsers, which broadly speaking have two families of capabilities for rendering graphics: the SVG API which supports vector rendering, and the Canvas API which supports raster rendering, and can exploit GPU hardware acceleration via a browser technology known as WebGL. Each `plotly` trace type is primarily rendered with either SVG or WebGL, although WebGL-powered traces also use some SVG. The following trace types use WebGL for part or all of the rendering:
4040

41-
* Accelerated versions of SVG trace types: `scattergl`, `scatterpolargl`, `heatmapgl`,
41+
* Accelerated versions of SVG trace types: `scattergl`, `scatterpolargl`, `heatmapgl`
4242
* High-performance multidimensional trace types: `splom`, or `parcoords`
4343
* 3-d trace types `scatter3d`, `surface`, `mesh3d`, `cone`, `streamtube`
4444
* Mapbox Gl JS-powered trace types: `scattermapbox`, `choroplethmapbox`, `densitymapbox`
@@ -48,9 +48,15 @@ jupyter:
4848
WebGL is a powerful technology for accelerating computation but comes with some strict limitations:
4949

5050
1. GPU requirement: WebGL is a GPU (graphics card) technology and therefore requires specific hardware which is available in most but not all cases and is supported by most but not all browsers
51-
2. Rasterization: WebGL-rendered data is drawn as a grid of pixels rather than as individual shapes, so can appear pixelated or fuzz in certain cases, and when exported to static file formats will appear pixelated on zoom
51+
2. Rasterization: WebGL-rendered data is drawn as a grid of pixels rather than as individual shapes, so can appear pixelated or fuzz in certain cases, and when exported to static file formats will appear pixelated on zoom. In addition: text rendering will differ between SVG and WebGL-powered traces.
5252
3. Context limits: browsers impose a strict limit on the number of WebGL "contexts" that any given web document can access. WebGL-powered traces in `plotly` can use multiple contexts in some cases but as a general rule, **it may not be possible to render more than 8 WebGL-involving figures on the same page at the same time.**
53-
4. Size limits: browsers impose hardware-dependent limits on the height and width of figures using WebGL
53+
4. Size limits: browsers impose hardware-dependent limits on the height and width of figures using WebGL which users may encounter with extremely large plots (e.g. tens of thousands of pixels of height)
54+
55+
In addition to the above limitations, the WebGL-powere version of certain SVG-powered trace types (`scattergl`, `scatterpolargl`, `heatmapgl`) are not complete drop-in replacements for their SVG counterparts yet
56+
* Available symbols will differ
57+
* Area fills are not yet supported in WebGL
58+
* Range breaks on time-series axes are not yet supported
59+
* Axis range heuristics may differ
5460

5561
### WebGL for Scatter Performance
5662

0 commit comments

Comments
 (0)