matplotlib / matplotlib/matplotlib

[MNT]: in class cursor,when the mouse moves out of the ax, redrawing takes a long time

未關閉
#29,731 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

Maintenance
主要語言
Python
星號
23.2k
分支
8.5k
平均合併
1 天 6 小時
30 天內合併 PR
66

描述

Summary

https://github.com/matplotlib/matplotlib/blob/v3.10.1/lib/matplotlib/widgets.py#L1937
self.canvas.draw() takes a long time when mouse moves out

Proposed fix

restore the background
self.canvas.restore_region(self.background)
self.canvas.blit(self.ax.bbox)

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 lib/matplotlib/widgets.py 中 1937 行附近的 cursor 程式碼開始,重現滑鼠離開座標軸時的緩慢重繪。評估提議的 background restore 和 blit 行為,然後驗證 cursor 重繪能夠及時完成,同時不改變預期的 plot 顯示。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
matplotlib, python
領域
data-visualization, performance
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。