{"action":"created","issue":{"url":"https://api.github.com/repos/d3/d3-array/issues/77","repository_url":"https://api.github.com/repos/d3/d3-array","labels_url":"https://api.github.com/repos/d3/d3-array/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/d3/d3-array/issues/77/comments","events_url":"https://api.github.com/repos/d3/d3-array/issues/77/events","html_url":"https://github.com/d3/d3-array/issues/77","id":372232454,"node_id":"MDU6SXNzdWUzNzIyMzI0NTQ=","number":77,"title":"Histogram with specific bins","user":{"login":"sjensen85","id":3399125,"node_id":"MDQ6VXNlcjMzOTkxMjU=","avatar_url":"https://avatars2.githubusercontent.com/u/3399125?v=4","gravatar_id":"","url":"https://api.github.com/users/sjensen85","html_url":"https://github.com/sjensen85","followers_url":"https://api.github.com/users/sjensen85/followers","following_url":"https://api.github.com/users/sjensen85/following{/other_user}","gists_url":"https://api.github.com/users/sjensen85/gists{/gist_id}","starred_url":"https://api.github.com/users/sjensen85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjensen85/subscriptions","organizations_url":"https://api.github.com/users/sjensen85/orgs","repos_url":"https://api.github.com/users/sjensen85/repos","events_url":"https://api.github.com/users/sjensen85/events{/privacy}","received_events_url":"https://api.github.com/users/sjensen85/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-20T17:09:53Z","updated_at":"2018-10-20T17:30:56Z","closed_at":"2018-10-20T17:30:56Z","author_association":"NONE","body":"Hello,\r\n\r\nI am trying to show a bar chart histogram with two different sets of data, displayed with two different series of bars. I have used this to calculate the bins and data that fits into those bins:\r\n\r\n```\r\n    var max = d3.max(data);\r\n    var min = d3.min(data);\r\n    var x = d3\r\n      .scaleLinear()\r\n      .domain([min, max])\r\n      .range([0, 400]);\r\n\r\n    var histogram = d3\r\n      .histogram()\r\n      .domain(x.domain())\r\n      .thresholds(x.ticks(10));\r\n\r\n    return histogram(data);\r\n```\r\n\r\nUsing this, calculating the second set of data gives me separate bins. However I would like the second set of data to be in the same bins as the first. Is this possible and if so, how would I go about it? I am having a rough time finding anything for specifying the exact bins I would like to use on the second set of data.\r\n\r\n(I didn't realize I posted this in d3-array. Let me know if I should post somewhere else.)"},"comment":{"url":"https://api.github.com/repos/d3/d3-array/issues/comments/431602384","html_url":"https://github.com/d3/d3-array/issues/77#issuecomment-431602384","issue_url":"https://api.github.com/repos/d3/d3-array/issues/77","id":431602384,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTYwMjM4NA==","user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T17:30:56Z","updated_at":"2018-10-20T17:30:56Z","author_association":"MEMBER","body":"Pass the desired bin thresholds to [*histogram*.thresholds](https://github.com/d3/d3-array/blob/master/README.md#histogram_thresholds)."}}
{"actor":{"display_login":"mbostock"}}