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

histogram bin labels are sometimes incorrect #14

Closed
JohnHBrock opened this issue Aug 20, 2015 · 3 comments
Closed

histogram bin labels are sometimes incorrect #14

JohnHBrock opened this issue Aug 20, 2015 · 3 comments
Labels

Comments

@JohnHBrock
Copy link
Contributor

The labels are sometimes correct, but other times they are out of order, or cover nonsensical ranges, so you may need to run these a few times to see the problem.

julia> histogram(rand(Int32, 10),bins=10)
                                ┌────────────────────────────────────────┐ 
                 (-2.0e9,5.0e8] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1                   │ 
                 (-1.5e9,1.0e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1                   │ 
                 (-1.0e9,1.5e9] │ 0                                      │ 
                 (-5.0e8,2.0e9] │ 0                                      │ 
                    (0.0,2.5e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2 │ 
                  (5.0e8,3.0e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1                   │ 
   (1.0e9,3.9999999999999995e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2 │ 
   (1.5e9,3.9999999999999995e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1                   │ 
                  (2.0e9,5.0e9] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2 │ 
                                └────────────────────────────────────────┘ 
julia> histogram(rand(Float32, 10),bins=10)
                             ┌────────────────────────────────────────┐ 
   (0.30000000000000004,0.1] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 4 │ 
                   (0.4,0.2] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2                   │ 
                   (0.5,0.3] │ 0                                      │ 
    (0.6000000000000001,0.4] │▇▇▇▇▇▇▇▇▇ 1                             │ 
    (0.7000000000000001,0.5] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2                   │ 
                   (0.8,0.6] │ 0                                      │ 
                             └────────────────────────────────────────┘

versioninfo():

Julia Version 0.3.8-pre+22
Commit 5078421* (2015-04-28 09:05 UTC)
Platform Info:
  System: Linux (x86_64-amazon-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libmkl_rt
  LAPACK: libmkl_rt
  LIBM: libimf
  LLVM: libLLVM-3.3
@Evizero
Copy link
Member

Evizero commented Aug 21, 2015

Thanks for reporting. That is weird! I'll look into it

Evizero added a commit that referenced this issue Aug 21, 2015
@Evizero
Copy link
Member

Evizero commented Aug 21, 2015

this should be fixed in master now (not tagged). The histogram should now exactly show what the hist-method returns. Let me know if you still get weird results

@Evizero
Copy link
Member

Evizero commented Aug 22, 2015

this should be fixed, so I am going to close this issue. Let me know if you still have issues

@Evizero Evizero closed this as completed Aug 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants