matplotlib / matplotlib/matplotlib
bad autoscale_view() with long curved FancyArrowPatch
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 23.2k
- フォーク
- 8.5k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 66
説明
### Bug report
When using a very long `FancyArrowPatch` with `connectionstyle="arc3"`, subsequent axes autoscaling can badly squash the figure's content. Example below exhibits the problem, but more extreme squashing can easily be obtained. Possibly this is not limited to `FancyArrowPatch`?
**Code for reproduction**
```python
import matplotlib
import matplotlib.pyplot as plt
fap = matplotlib.patches.FancyArrowPatch(
(10, 10),
(20, 2e4),
mutation_scale=50,
connectionstyle="arc3,rad=0.3",
)
_, ax = plt.subplots()
ax.add_patch(fap)
ax.set_title(f"matplotlib {matplotlib.__version__}")
ax.autoscale_view()
ax.figure.savefig("curved-arrow.png")
```
**Actual outcome**

**Expected outcome**
The axes view should span the drawn content. Any control point(s) required for the arc should be ignored.
**Matplotlib version**
* Operating system: Linux
* Matplotlib version: 3.3.4
* Matplotlib backend: Reproducible with at least `GTK3Agg` and `agg`.
* Python version: 3.9
Matplotlib installed via pip.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
FancyArrowPatch、connectionstyle="arc3"、および ax.autoscale_view() を使用した再現コードから始め、次に FancyArrowPatch と autoscale_view のエントリポイントを追跡します。提供された例で動作を確認し、制御点が計算された表示範囲にどのような影響を与えるかを特定します。軸が描画された内容を包含し、過度に押しつぶされず、例に対する回帰テストのカバレッジがあることを完了条件とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100