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

Bin Allocation and Support Selection w/ Geom.histogram #435

Closed
choct155 opened this issue Sep 21, 2014 · 2 comments
Closed

Bin Allocation and Support Selection w/ Geom.histogram #435

choct155 opened this issue Sep 21, 2014 · 2 comments

Comments

@choct155
Copy link

First and foremost, thank you for all the work you have done. Second, my issue concerns Geom.histogram. As detailed in this SO post, trying to plot the histogram on proportional data has resulted in a support that is too long and a single bar capturing all data on the [0,1] interval (so all of the data for proportional values). I have been advised that this may be a bug warranting an open issue. Am I doing something wrong?

@getzdan
Copy link

getzdan commented Sep 22, 2014

As, noted in the SO post, tracing the code leads to the function:
choose_bin_count_1d_discrete.
In it:

# minimum distance between two values
    mingap = zero(eltype(xs))
    for (a, b) in zip(1:length(xs_set)-1, 2:length(xs_set))
    mingap = mingap == zero(eltype(xs)) ? b - a : min(b - a, mingap)
end

seems to use the indices instead of the values, leading to problems further along.

@choct155
Copy link
Author

Much appreciated! Also, enjoyed the JuliaCon talk.

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

2 participants