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

Open
#1,290 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
kotlin, python

Research direction

Start by running the provided Python examples for geom_bin2d with bins=[2, 1], [1, 2], and [1, 1], comparing the tiles with the red points. No source file or test is named in the issue; done means the tiles cover all the space where the points occur in each case.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Kotlin
Stars
1.8k
Forks
63
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JetBrains/lets-plot

All issues in JetBrains/lets-plot

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.