lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

`geom_bin2d`: wrong geometry size when `bins=[n, 1]`

Open ASmirnov-HORIS opened this issue 11 months ago • 0 comments

Example:

data = {
    'x': [0, 0, 1, 2],
    'y': [0, 0, 1, 2],
}

ggplot(data, aes('x', 'y')) + geom_bin2d(bins=[2, 1]) + geom_point(color="red")

Expected:


The same problem occurs when we swap bins items:

ggplot(data, aes('x', 'y')) + geom_bin2d(bins=[1, 2]) + geom_point(color="red")

or when both items are equal to 1:

ggplot(data, aes('x', 'y')) + geom_bin2d(bins=[1, 1]) + geom_point(color="red")

In all cases, the tiles should cover all the space where there are points.

ASmirnov-HORIS avatar Feb 03 '25 10:02 ASmirnov-HORIS