{"action":"closed","issue":{"url":"https://api.github.com/repos/GiovineItalia/Gadfly.jl/issues/976","repository_url":"https://api.github.com/repos/GiovineItalia/Gadfly.jl","labels_url":"https://api.github.com/repos/GiovineItalia/Gadfly.jl/issues/976/labels{/name}","comments_url":"https://api.github.com/repos/GiovineItalia/Gadfly.jl/issues/976/comments","events_url":"https://api.github.com/repos/GiovineItalia/Gadfly.jl/issues/976/events","html_url":"https://github.com/GiovineItalia/Gadfly.jl/issues/976","id":221142085,"number":976,"title":"Error in Logic for Histogram with density=true","user":{"login":"trohwer","id":6370749,"avatar_url":"https://avatars0.githubusercontent.com/u/6370749?v=3","gravatar_id":"","url":"https://api.github.com/users/trohwer","html_url":"https://github.com/trohwer","followers_url":"https://api.github.com/users/trohwer/followers","following_url":"https://api.github.com/users/trohwer/following{/other_user}","gists_url":"https://api.github.com/users/trohwer/gists{/gist_id}","starred_url":"https://api.github.com/users/trohwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trohwer/subscriptions","organizations_url":"https://api.github.com/users/trohwer/orgs","repos_url":"https://api.github.com/users/trohwer/repos","events_url":"https://api.github.com/users/trohwer/events{/privacy}","received_events_url":"https://api.github.com/users/trohwer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-12T03:33:14Z","updated_at":"2017-04-12T16:46:19Z","closed_at":"2017-04-12T16:46:19Z","body":"I think, the scaling in density histogram is wrong; or at least, it does not align\r\nwith what Geom.density is doing. E.g. look at the code in statistics.jl:\r\n\r\nif stat.density\r\n            x_min = Gadfly.concrete_minimum(values)\r\n            span = x_max - x_min\r\n            binwidth = span / d\r\n            bincounts = bincounts ./ sum(bincounts) * binwidth\r\n        end\r\n\r\nIt should be / binwidth, not * binwidth. The integral over the density should yield 1, i.e.\r\nsum bincount(i)*binwidth(i) should be 1, which is true, if * binwith is replaced by /binwidth\r\nbut not in most cases with this logic.\r\n\r\nIf I change the * to /, then the plot aligns with the Geom.density."}}
{"actor":{"display_login":"tlnagy"}}