Skip to content

can I set different thresholds for x and y with Plot.bin? #872

Answered by mbostock
enjalot asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, e.g.

Plot.rect(sales, Plot.bin({fill: "count"},{x: {value: "date", thresholds: 30}, y: "medianAskingPrice"}))

From the README:

To pass separate binning options for x and y, the x and y input channels can be specified as an object with the options above and a value option to specify the input channel values.

Plot.binX({y: "count"}, {x: {thresholds: 20, value: "culmen_length_mm"}})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@enjalot
Comment options

Answer selected by mbostock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants