Strange bucket borders when binning interval conflicts with axis interval #2450
mwaibel-go
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This post is intended to be purely informational feedback on how I recently stubbed my toe.
When specifying an interval for the y axis, “the default scale.transform [is set] to the given interval’s interval.floor function.” 1 This produces strange results when also binning, and using a binning interval that’s not evenly divisible by the axis’ interval.
See this example:
In order to have each band the same width (as was intended), we have to explicitly disable the transform on the axis:
Footnotes
https://observablehq.com/plot/features/scales#scale-options ↩
All reactions