Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splom open items #2555

Open
5 of 7 tasks
etpinard opened this issue Apr 13, 2018 · 5 comments
Open
5 of 7 tasks

Splom open items #2555

etpinard opened this issue Apr 13, 2018 · 5 comments
Labels
feature something new P3 not needed for current cycle

Comments

@etpinard
Copy link
Contributor

etpinard commented Apr 13, 2018

Follow-up from #2372, #2505 and #2527

Things that were left out

Things we could do, but would require some thought

  • Add sub-trace on the diagonal (e.g. with diagonal.mode: 'scattergl' || 'histogram' || 'box' || 'violin', see Introducing splom traces #2505 (comment)
  • Add attribute in dimensions that could default the splom generated axes' style (e.g. dimensions[i].showgrid: false would remove grid lines from all axes corresponding to dimensions[i]). Edit: PR Multi-axis-type sploms #2899 added dimensions[i].axis.type, it would be easy to add more attribute under that container.
  • Make one single cartesian <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 Introducing splom traces #2505 (comment)
  • optimize regl-line2d for grid data
  • implement matching axes Matching axes #1549
  • Remove remaining O(n^2) SVG items. In addition to g.draglayer mentioned above, there are two categories I can see:
    • Subplot backgrounds rect.bg - These could be omitted entirely when plot_bgcolor matches paper_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 Aggressive splom perf #3057, possible future improvements in Aggressive splom perf #3057 (comment)
    • Subplot groups .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 associated clipPath#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:

@etpinard etpinard added the feature something new label Apr 13, 2018
@etpinard
Copy link
Contributor Author

Pasting benchmarks from #2505 (comment) 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')

@etpinard
Copy link
Contributor Author

etpinard commented Oct 2, 2018

From @alexcjohnson 's #3057 (comment), 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 whether overlappingDomain 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).

@sebastian-raubach
Copy link

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

@AniWar
Copy link

AniWar commented Jun 17, 2020

Hello , any updates for diagonal sub trace ? Would love to have this feature .

@InCogNiTo124
Copy link

Bump for histograms on the diagonals

@gvwilson gvwilson self-assigned this Jun 11, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 not needed for current cycle label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

5 participants