Open etpinard opened 6 years ago
Pasting benchmarks from https://github.com/plotly/plotly.js/pull/2505#issuecomment-381665092 out for future reference:
Here are some first-render benchmarks with showupperhalf: false
and diagonal.visible: false
:
# of dimensions | # of values per dimension | regl-line2d grid lines? | time [ms] |
---|---|---|---|
10 | 20k | no | 400-500 |
20 | 5k | yes | 600-700 |
30 | 2k | yes | 900-1000 |
40 | 1k | yes | 1300-1400 |
50 | 800 | yes | 2000-2300 |
computed using:
var Nvars = /* fill this in */
var Nrows = /* fill this in */
var dims = []
for(var i = 0; i < Nvars; i++) {
dims.push({values: []})
for(var j = 0; j < Nrows; j++) {
dims[i].values.push(Math.random())
}
}
Plotly.purge(gd);
console.time('splom')
Plotly.newPlot(gd, [{
type: 'splom',
dimensions: dims,
showupperhalf: false,
diagonal: {visible: false},
}], {width: 2000, height: 2000})
console.timeEnd('splom')
From @alexcjohnson 's https://github.com/plotly/plotly.js/pull/3057#discussion_r221411382, about speeding up lsInner
:
overlappingDomain
might itself be a heavy lift for a large number of subplots (am I reading this right that for NxN subplots this is O(N^4), ie O(N^2) tests per subplot???), all for the fairly unusual case of inset plots, or otherwise partially occluding subplots. Perhaps it would be worthwhile doing a faster check for whetheroverlappingDomain
is even necessary to call, by looping over all x axes to see if any of their domains overlap, then the same over all y axes? That would only be O(N^2) to possibly (usually!) avoid O(N^4).
Hi, I was wondering if there has been any progress on this issue since late 2018? Especially on the "Add sub-trace on the diagonal" functionality. Thanks
Hello , any updates for diagonal sub trace ? Would love to have this feature .
Bump for histograms on the diagonals
Follow-up from https://github.com/plotly/plotly.js/issues/2372, https://github.com/plotly/plotly.js/pull/2505 and https://github.com/plotly/plotly.js/pull/2527
Things that were left out
selectedpoints
info across multiple splom-generated subplots, see https://github.com/plotly/plotly.js/pull/2505#issuecomment-380855752hasOnlyLargeSploms: true
withscattergl
trace(s) fails to redraw scattergl trace(s), see https://github.com/plotly/plotly.js/issues/2562 FIXED in https://github.com/plotly/plotly.js/pull/3067Things we could do, but would require some thought
diagonal.mode: 'scattergl' || 'histogram' || 'box' || 'violin'
, see https://github.com/plotly/plotly.js/pull/2505#discussion_r177823962dimensions
that could default the splom generated axes' style (e.g.dimensions[i].showgrid: false
would remove grid lines from all axes corresponding todimensions[i]
). Edit: PR https://github.com/plotly/plotly.js/pull/2899 addeddimensions[i].axis.type
, it would be easy to add more attribute under that container.<g .draglayer>
covering the whole plot area instead of multiple (12 I think) per subplot. This would speed up initial rendering (especially for splom, but also for all graphs with many subplots), make cross-subplot selections a little easier to manage, see https://github.com/plotly/plotly.js/pull/2505#discussion_r181237581regl-line2d
for grid datag.draglayer
mentioned above, there are two categories I can see:rect.bg
- These could be omitted entirely whenplot_bgcolor
matchespaper_bgcolor
(and both are fully opaque - which is true by default), otherwise perhaps we could move them into the WebGL canvas though @etpinard points out this may impact pan/zoom performance. UPDATE: optimized when plot and paper bgcolor match in https://github.com/plotly/plotly.js/pull/3057, possible future improvements in https://github.com/plotly/plotly.js/pull/3057#discussion_r222030211.subplot.x<N>y<M>
- normally only the ones with tick labels and titles have any visible content in them, but currently they all have some empty groups, an associatedclipPath#clip<UID>x<N>y<M>plot
, and a few<path d="M0,0">
elements, we should be able to avoid even creating the unused ones.Related issues that would benefit splom performance:
faster axis autorange relayout:https://github.com/plotly/plotly.js/issues/2546per-axis 'axrange' relayout: https://github.com/plotly/plotly.js/issues/2547stash pts selections for pan: https://github.com/plotly/plotly.js/issues/2548Axes.doTicks
https://github.com/plotly/plotly.js/issues/1988 - done in: https://github.com/plotly/plotly.js/pull/4165