position_dodge2() leaves nested rectangles overlapping

オープン
#1,163 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@MahnoorAhmed999 がすでに取り組んでいます。

2026年12月3日 から。

  • #1165 @MahnoorAhmed999 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python

調査の方向性

Read find_x_overlaps() in plotnine/positions/position_dodge2.py at the linked lines. Check how it groups intervals when a short rectangle lies between wider overlapping intervals, then run the relevant position dodge tests. Done means the three rectangles no longer overlap after dodging and existing overlap cases still pass.

索引モデルが issue の本文から書いたものです。

説明

I plotted three rectangles with x-ranges [0, 10], [5.1, 5.5], and [5.6, 6.0] using geom_rect(position=position_dodge2(padding=0)). All three had the same y-range. After drawing, plotnine placed the wide rectangle at [2.4, 7.4] and left the third rectangle at [5.6, 6.0], entirely inside it. Overlapping rectangles can hide a data series in the resulting chart.

find_x_overlaps() compares each rectangle’s left edge only with the previous rectangle’s right edge. A short rectangle can therefore break the group even when a wider rectangle still spans it. The fix is to group intervals by left edge while tracking the furthest right edge in the current group. Overlap detection

主要言語
Python
スター
4.8k
フォーク
269
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

has2k1/plotnine のほかの issue

has2k1/plotnine の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。