[MNT]: Consolidate axis sharing logic
维护者通常 1 天内回复
@tamrind69 已经在做这个了。
开始于 2026年10月30日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Read the Axes implementation and search for _sharex, _sharey, and Axes._shared_axes['x'] to locate the remaining uses and understand how sharing state is handled. Check whether any behavior depends on the parent-child relation, then remove the redundant state if the grouper can cover those uses. Done means axis sharing continues to work without _sharex/_sharey; the issue does not name tests, so identify and run the relevant sharing tests.
由索引模型根据 Issue 内容生成。
描述
Summary
Sharing information is stored redundantly:
- in the grouper class attribute
Axes._shared_axes['x']. The grouper stores the shared axes in a list without a hierarchy. - in the
_sharexattribute of Axes. This is asymmetic in that the only one of the Axes gets the_sharexattribute set, resulting in a parent-child relation.
Proposed fix
From https://github.com/matplotlib/matplotlib/issues/30159#issuecomment-3539310071
I think a reasonable incremental improvement would be to remove the
Axes._sharex/ystate. It's only used in very few places and can more reasonably be handled via the grouperAxes._shared_axes['x'].
Still to be clarified: Do we need the parent-child relation in any way? - From a quick look I don't think so.
- 主要语言
- Python
- 星标
- 23.5k
- 派生
- 8.6k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 64
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/matplotlib 的其他 Issue
-
[Bug]: Saving a NonUniformImage with bbox_inches="tight" raises TypeError when extent is omitted未关闭
难度 2/5 1-3 小时 新手友好度 74/100
matplotlib/matplotlib#32707 ·
维护者通常 1 天内回复
-
[Bug]: withTickedStroke raises ValueError when the line contains NaN可能已有人在做 @RjyavardhanSingh 于 3 天前认领。 未关闭first-contribution topic: path handling
难度 2/5 1-3 小时 新手友好度 85/100
matplotlib/matplotlib#32689 · 2 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Constrained layout raises ZeroDivisionError when the first height/width ratio is zero可能已有人在做 @yqtian-se 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
matplotlib/matplotlib#32684 · 3 条评论 ·
维护者通常 1 天内回复
-
[Bug]: twin axes ignore the navigation opt-outs可能已有人在做 @NaumanRafay 于 36 天前认领。 未关闭topic: toolbar
难度 2/5 1-3 小时 新手友好度 78/100
matplotlib/matplotlib#32528 · 2 条评论 ·
维护者通常 1 天内回复
-
[Bug]: macOS font discovery raises KeyError('_items') for an incomplete system_profiler font record未关闭first-contribution OS: Apple status: needs clarification topic: text/fonts
难度 2/5 1-3 小时 新手友好度 84/100
matplotlib/matplotlib#32328 · 4 条评论 ·
维护者通常 1 天内回复
查看 matplotlib/matplotlib 的全部 Issue
相似的 Issue
-
area/network kind/documentation triage/needs-human
难度 1/5 1-3 小时 新手友好度 88/100
canonical/k8s-snap#3533 · 1 条评论 ·
维护者通常 1 天内回复
-
area: ops bug effort: small
难度 1/5 1 小时以内 新手友好度 91/100
juandresrodca/AdminForge#71 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
fossasia/eventyay-exhibition#465 · 3 条评论 · 1 个 reaction ·
维护者通常 3 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Deltakit/deltakit-circuit#28 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复