matplotlib / matplotlib/ipympl

occasional graphical corruption when manipulating plots using the zoom and pan widgets

未关闭
#566 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
1.7k
派生
234
PR 合并指标
30 天内没有已合并 PR

描述

## Describe the issue
Manipulating fairly large (~M points) plots,. found occasionally that the redraw would fail, then would leave old pixels in place.

Using the 'Back to previous view' / 'Forward to next view' appears to fix the corruption, otherwise it just sticks around until the figure is redrawn by re-running the cell producing it. I.E., once it appears, hitting the 'home' button does not clear it.

Affects both the plot as well as the axes, with the axes becoming unreadable. Saving the corrupted pixels using the 'Download plot' button works - in that the saved png includes the pixel corruption.

## Versions

```

3.12.3 (main, Jul 15 2024, 15:34:06) [GCC 12.2.0]
ipympl version: 0.9.4
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : 8.1.5
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.3
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : not installed
qtconsole : not installed
traitlets : 5.14.3
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments:
subcommand the subcommand to launch

options:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable format.
--json output paths as machine-readable json
--debug output debug information about paths

Available subcommands: dejavu events execute kernel kernelspec lab labextension labhub migrate nbconvert run server troubleshoot trust

Jupyter command `jupyter-nbextension` not found.
```
I assume you meant `|| jupyter labextension list` not `&&`.

```
JupyterLab v4.2.3
/home/rgd2/.pyenv/versions/3.12.3/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
jupyter-matplotlib v0.11.4 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
app dir: /home/rgd2/.pyenv/versions/3.12.3/share/jupyter/lab
```

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用 ipympl 0.9.4 在 JupyterLab 4.2.3 中通过一个大型绘图复现该问题,然后使用 Zoom、Pan、Back、Forward 和 Home 控件对其进行操作。比较重绘失败后的画布和坐标轴,并使用 Download plot 按钮验证结果;完成的标准是 widget 交互后不再残留损坏的像素。

由索引模型根据 Issue 内容生成。

评估

技术栈
jupyter, jupyter-notebook, python
领域
data-visualization, frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。