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

Histograms on splom diagonals #6991

Open
alexcjohnson opened this issue May 8, 2024 · 4 comments
Open

Histograms on splom diagonals #6991

alexcjohnson opened this issue May 8, 2024 · 4 comments

Comments

@alexcjohnson
Copy link
Collaborator

Several other implementations of splom allow for a different plot type on the diagonal - which makes sense because the diagonal subplots are always just diagonal lines of points. What we really want is a simple view of the distribution of that one dimension in each diagonal subplot. For my current purposes the best view would be a histogram, and I suspect implementing only that would be a well-received improvement, but eventually box and violin could also be nice additions.

We anticipated this feature with a comment in #2555 and with a comment in the attributes for splom:

diagonal: {
visible: {
valType: 'boolean',
dflt: true,
editType: 'calc',
description: [
'Determines whether or not subplots on the diagonal are displayed.'
].join(' ')
},
// type: 'scattergl' | 'histogram' | 'box' | 'violin'
// ...
// more options
editType: 'calc'
},

That comment I think is right, trace.diagonal.type sets the trace type for all of the diagonal subplots, then we add more attributes into trace.diagonal that mirror the attributes available to histogram (and the other trace types if we add those). For histograms, trace.diagonal.marker.color should be inherited from trace.marker.color (and maybe similar with marker.line.width and marker.line.width?)

In addition, each dimension should be able to override everything about its own diagonal subplot, so trace.dimensions[i].diagonal should accept all the same options as trace.diagonal.

@archmoj
Copy link
Contributor

archmoj commented May 8, 2024

I think instead of type we may need a container e.g. trace to help specify extra trace options e.g. zsmooth for heatmap. Right?

@alexcjohnson
Copy link
Collaborator Author

Is diagonal not already enough of a container? Everything in there, including type, is trace attributes for what you show on the diagonal, with the caveat that the one existing attribute there, visible, also controls whether we even create that subplot, but that seems OK to me.

@archmoj
Copy link
Contributor

archmoj commented May 8, 2024

Yes that's enough. There is not much in it at the moment.

@archmoj
Copy link
Contributor

archmoj commented May 24, 2024

@alexcjohnson FYI - I did spend some time on this on the way to MTL on splom-diagonal-histogram branch.
But it turned out to be a complex project considering the need to provide various steps e.g. supply-defaults, calc and cross-trace-calc for heatmap to be drawn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants