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

InexactError #860

Closed
ShnitzelKiller opened this issue Jun 30, 2016 · 2 comments · Fixed by #1237
Closed

InexactError #860

ShnitzelKiller opened this issue Jun 30, 2016 · 2 comments · Fixed by #1237
Labels

Comments

@ShnitzelKiller
Copy link

When plotting a collection with exactly one data point using Geom.histogram2d or Geom.hexbin, Gadfly crashes:
julia> plot(x=[0], y=[0], Geom.histogram2d)

ERROR: InexactError()
 in trunc at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in choose_bin_count_2d at /Users/james/.julia/v0.4/Gadfly/src/bincount.jl:256
 in apply_statistic at /Users/james/.julia/v0.4/Gadfly/src/statistics.jl:607
 in apply_statistics at /Users/james/.julia/v0.4/Gadfly/src/statistics.jl:38
 in render_prepare at /Users/james/.julia/v0.4/Gadfly/src/Gadfly.jl:671
 in render at /Users/james/.julia/v0.4/Gadfly/src/Gadfly.jl:718
 in display at /Users/james/.julia/v0.4/Gadfly/src/Gadfly.jl:952
 [inlined code] from multimedia.jl:151
 in display at /Users/james/.julia/v0.4/Gadfly/src/Gadfly.jl:904
 in print_response at REPL.jl:134
 in print_response at REPL.jl:121
 in anonymous at REPL.jl:624
 in run_interface at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in run_frontend at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in run_repl at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in _start at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib

This also happens when specifying your own bin counts.

@tlnagy
Copy link
Member

tlnagy commented Aug 29, 2016

I can reproduce this, but I'm not sure what the proper way to handle this is. How would you even set up binning when there is only one datapoint?

@tlnagy tlnagy added the question label Sep 1, 2016
@tlnagy
Copy link
Member

tlnagy commented Sep 1, 2016

@shashi any idea how to handle this?

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

Successfully merging a pull request may close this issue.

2 participants