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

"bargroupgap" adds space between histogram "bars" #2521

Closed
ndabAP opened this issue Apr 4, 2018 · 10 comments
Closed

"bargroupgap" adds space between histogram "bars" #2521

ndabAP opened this issue Apr 4, 2018 · 10 comments

Comments

@ndabAP
Copy link

ndabAP commented Apr 4, 2018

See:

https://codepen.io/anon/pen/JLBVEp?editors=0010

Histogram shouldn't have gaps. See:

https://www.mathsisfun.com/data/images/bar-chart-vs-histogram.svg

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

Right. Histograms have bargroupgap set to 0 by default. So, you're arguing that bargroupgap should be ignored completely always for histogram traces?

@ndabAP
Copy link
Author

ndabAP commented Apr 4, 2018

Exactly, because it's continuous instead of categorical. What do you think?

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

because it's continuous instead of categorical

Yep, that's why be default bargroupgap: 0. But if the user really really wants gaps in there, I'm not sure we should stop them.

At the very least what you're asking is a breaking change, so it won't happen anytime soon.

@ndabAP
Copy link
Author

ndabAP commented Apr 4, 2018

Understood :) I'm making a theme for Plotly and try to generalize as much as possible. The easiest would be to use one master layout for all charts.

I'd add another property like histogramgab. That wouldn't be a breaking change.

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

I'd add another property like histogramgab. That wouldn't be a breaking change.

That's an idea, but still it would be a breaking change. Some users might be using bargroupgap on histograms right now.

@ndabAP
Copy link
Author

ndabAP commented Apr 4, 2018

That's correct. Just for me to know for my personal future work: Is it considered a bug by you or will it never be changed?

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

I vote for not a bug.

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

By the way, if you're interested in themes, you may want to follow #2469

@alexcjohnson
Copy link
Collaborator

I vote for not a bug.

I think so too, I'm afraid. You can make a histogram on a categorical axis, for example, which is of course not continuous and therefore a gap is reasonable. And you can mix (and stack) histogram traces with bar traces for cases where some of your data is pre-binned, and in that case it doesn't make sense to have two different gaps, we would have to pick one of them to win and ignore the other.

@ndabAP
Copy link
Author

ndabAP commented Apr 4, 2018

Ah great and very relevant. Closing this.

@ndabAP ndabAP closed this as completed Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants