-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Shared autobin for overlaid histograms #3749
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
Comments
Similar to #3515 (comment):
Furthermore, what does |
How about we just force |
Yep, that sounds about right. With this and #3515 (comment) , we'll have a pretty robust |
Not sure what the implications of that are... can you unpack please? |
It wouldn't make sense to have incompatible bins within a single stack or group - you need to have matching position values, and we already do force this in the stacking/grouping code. Since that's exactly what we're talking about here, but extending this forcing to other traces that aren't otherwise known to need compatible positions, we might as well make this correspondence explicit: instead of inferring that a set of traces need to be forced into compatible positions based on their stacking or grouping, it becomes a 2-step process. (1) infer that these traces need to have the same |
But.... this issue is about overlaid histograms, not grouped or stacked ones, right? I'm having trouble seeing what the API implications are here. I was expecting some new attr that I could set somewhere that said "share bins" that would kick in if the bars are overlaid. |
With |
Oh I see. ok then. Still curious what the final API would look like :) |
For e.g. the simple case of two histograms that are currently overlaid. |
Plotly.newPlot(gd, [{
type: 'histogram',
x: [1,1,2,3,3,4],
opacity: 0.8,
bingroup: '1'
}, {
type: 'histogram',
x: [2,4,4,1,2,3],
opacity: 0.8,
bingroup: '1'
}], {
barmode: 'overlay'
}) that looks like: with auto-bins |
Ah ok this makes sense. Too many stack/alignment/bin-group possibilities for my pre-coffee brain to think about though :) |
does it make sense to do #3614 first? |
I'm starting to think that, yes maybe we should get |
For
px
we need some new attrs to gethistogram
s to share autobin logic even when inoverlay
mode (they currently do so in the other modes by default).Ref #3515
The text was updated successfully, but these errors were encountered: