Consider the following plot invocation. Every hour there’s an event and I’m trying to bin them in intervals of 11 hours each.
Plot.plot({
color: { legend: true, transform: null },
marks: [
Plot.barY(
Array.from({length: 48}, (_, i) => (new Date(2026, 7, 1 + Math.floor(i / 24), i%24))),
Plot.binY({fill: 'count'}, {y: { interval: '11 hours'}})
)
]
})
I expected each bin to be the same size (maybe expect the very last one). Instead each day is individually divided into two bins of size 11 hours and one bin of size 2 hours.
The same happens for every interval of which 24 hours isn’t an integer multiple (i.e., 5, 7, 9, …).
This might be related to #2450
Consider the following plot invocation. Every hour there’s an event and I’m trying to bin them in intervals of 11 hours each.
I expected each bin to be the same size (maybe expect the very last one). Instead each day is individually divided into two bins of size 11 hours and one bin of size 2 hours.
The same happens for every interval of which 24 hours isn’t an integer multiple (i.e., 5, 7, 9, …).
This might be related to #2450