You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JupyterLab 4.1.2中Matplotlib交互式绘图无法捕获鼠标及点击事件

Matplotlib事件处理Jupyter示例无坐标输出问题

问题现象

  • 运行Matplotlib官方的coords_demo示例代码,仅显示正弦曲线,未打印数据坐标和像素坐标信息
  • 添加%matplotlib widget后生成带缩放控件的交互式绘图,但仍无坐标输出
  • 切换为%matplotlib ipympl配置(已确认ipympl安装完成),重启浏览器和JupyterLab后,移动/点击绘图区域依旧无任何坐标或点击相关输出

运行环境

  • 系统:Mac + Chrome浏览器
  • Jupyter核心组件版本:
% jupyter --version
Selected Jupyter core packages...
IPython          : 8.21.0
ipykernel        : 6.29.2
ipywidgets       : 8.1.2
jupyter_client   : 8.6.0
jupyter_core     : 5.7.1
jupyter_server   : 2.12.5
jupyterlab       : 4.1.2
nbclient         : 0.8.0
nbconvert        : 7.16.1
nbformat         : 5.9.2
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.1
  • ipympl版本:
% conda list |grep ipympl
ipympl                    0.9.3              pyhd8ed1ab_0    conda-forge

相关背景

该问题已在Matplotlib的GitHub仓库提交Issue,内容涉及Matplotlib文档/示例的修复


内容的提问来源于stack exchange,提问作者Dave X

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 17:00:02