`gpos` `pos` positional count begins at 1 when should be Pythonic 0
@sadielbartholomew 已经在做这个了。
开始于 2024年10月3日。
评估
这个 Issue 还没有评估数据。
描述
The gpos function requires an integer argument pos to define the plot position. The first position is encoded by the value 1, but this is very un-Pythonic, since 0 which encodes the first position for mots of not all Python objects. In practice, this can making programmatic usage awkward, for example when iterating over something to assign sub-plots, a value i + 1 needs to be used instead of simply i, which would be much cleaner and understandable to those reading the code:
for i, proj in enumerate(<variable to change across subplots>):
cfp.gpos(i + 1)
<generate sub-plot with given variable choice>
So, we should set the position pos to being at 0 and count from there, not from 1. The pos argument could also be documented much more clearly, so this should be done when this change is made.
- 主要语言
- Python
- 星标
- 21
- 派生
- 11
- 平均合并
- 7 小时 11 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NCAS-CMS/cf-plot 的其他 Issue
-
testing
难度 3/5 1-2 天 新手友好度 58/100
-
docs enhancement
难度 3/5 1-2 天 新手友好度 64/100
-
Add animation hooks into cf-plot可能重新可做 @bnlawrence 于 98 天前认领,目前没有进行中的 PR。 未关闭enhancement
-
bug v35plus
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
area/install reliability
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
FluidNumerics/fluid-walk-blocker#191 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
TransformerLensOrg/TransformerLens#1868 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
climate-analytics-lab/jax-gcm#1057 ·
维护者通常 1 天内回复