matplotlib / matplotlib/ipympl

Zoom does not respect Ctrl key for retaining aspect ratio

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

还没有人认领这个 Issue。

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

描述

## Describe the issue
The tooltip for the pan button widget includes the text "x/y fixes axes, CTRL fixes aspect". Holding down x/y works, but Ctrl does not retain the aspect ratio when zooming with the right mouse button (at least not in Firefox).

## Versions

I'm using the `quay.io/jupyter/scipy-notebook` docker image with image id `36fc325c0178`.
```
$ ( set -x ; python -c "import sys; print('\n',sys.version); import ipympl; print('ipympl version:', ipympl.__version__)" ; jupyter --version ; jupyter nbextension list ; jupyter labextension list )
+ python -c 'import sys; print('\''\n'\'',sys.version); import ipympl; print('\''ipympl version:'\'', ipympl.__version__)'

3.12.11 | packaged by conda-forge | (main, Jun 4 2025, 14:45:31) [GCC 13.3.0]
ipympl version: 0.9.7
+ jupyter --version
Selected Jupyter core packages...
IPython : 9.4.0
ipykernel : 6.29.5
ipywidgets : 8.1.7
jupyter_client : 8.6.3
jupyter_core : 5.8.1
jupyter_server : 2.16.0
jupyterlab : 4.4.4
nbclient : 0.10.2
nbconvert : 7.16.6
nbformat : 5.10.4
notebook : 7.4.4
qtconsole : not installed
traitlets : 5.14.3
+ jupyter nbextension list
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 nbclassic nbconvert notebook run server troubleshoot trust

Jupyter command `jupyter-nbextension` not found.
+ jupyter labextension list
JupyterLab v4.4.4
/opt/conda/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
nbdime-jupyterlab v3.0.2 enabled OK
jupyter-matplotlib v0.11.7 enabled OK
@jupyter-notebook/lab-extension v7.4.4 enabled OK
@jupyterlab/git v0.51.2 enabled OK (python, jupyterlab-git)
@jupyter-widgets/jupyterlab-manager v5.0.15 enabled OK (python, jupyterlab_widgets)
```

贡献指南

打开贡献指南

从这里开始

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

调研方向

在报告的 JupyterLab 设置中,使用 Firefox 和鼠标右键复现平移按钮的缩放行为,并将 Ctrl 修饰键与正常工作的 x/y 修饰键进行比较。跟踪平移按钮 widget 的浏览器端输入处理;完成标准是 Ctrl 在缩放时保持宽高比,且 tooltip 仍然准确。

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

评估

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

把新 issue 发到你的邮箱

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