Incorrect discrete 'curl' colormap
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
首先使用 matplotlib、cmocean、numpy、TwoSlopeNorm 和 BoundaryNorm 运行 issue 中的四图复现。比较在 BoundaryNorm 下 cmo.balance 和 cmo.curl 的结果,然后检查 curl 颜色映射的设置和相关的归一化行为;完成的标准是离散的 curl 颜色像连续示例一样以 0 为中心。
由索引模型根据 Issue 内容生成。
描述
Looks like something is off when you specify a discrete normalization with the curl colormap.
The code below will produce 4 plots; the first 3 are as expected but the last one demonstrates the issue. Colors are no longer centered around 0 (white).
import matplotlib.pyplot as plt
import cmocean
import numpy as np
data = np.random.normal(loc=0, size=(10, 10))
norm = mpl.colors.TwoSlopeNorm(0, -2, 2)
plt.imshow(data, cmap='cmo.balance', norm=norm)
plt.colorbar()
plt.title('TwoSlopeNorm, Balance (Correct)')
plt.figure()
plt.imshow(data, cmap='cmo.curl', norm=norm)
plt.colorbar()
plt.title('TwoSlopeNorm, Curl (Correct)')
bounds = np.linspace(-2, 2, 21)
norm = mpl.colors.BoundaryNorm(bounds, 256)
plt.figure()
plt.imshow(data, cmap='cmo.balance', norm=norm)
plt.colorbar()
plt.title('BoundaryNorm, Balance (CORRECT)')
plt.figure()
plt.imshow(data, cmap='cmo.curl', norm=norm)
plt.colorbar()
plt.title('BoundaryNorm, Curl (INCORRECT)');
- 主要语言
- Python
- 星标
- 269
- 派生
- 54
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/cmocean 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 45/100
matplotlib/cmocean#120 ·
-
难度 2/5 1-3 小时 新手友好度 50/100
matplotlib/cmocean#119 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 52/100
matplotlib/cmocean#118 ·
-
难度 3/5 1-2 天 新手友好度 35/100
matplotlib/cmocean#115 ·
-
难度 3/5 1-2 天 新手友好度 42/100
matplotlib/cmocean#112 ·
查看 matplotlib/cmocean 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·