Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Country borders out of scope for polar projections w/ `axes=False`

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

还没有人认领这个 Issue。

评估

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

调研方向

首先使用 cfp.mapset(proj="npstere" 或 "spstere") 和 cfp.con(..., axes=False) 运行提供的最小复现,然后将其与启用坐标轴的情况进行比较。跟踪极投影的设置和国家边界的渲染,以确定为什么边界使用了圆形绘图区域之外的边界范围。完成的标准是两个极投影案例中的边界都与数据圆对齐,同时其他投影保持不变。

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

描述

When doing (at least) contour plotting with the projection set with mapset to either of the polar stereographic cases, "npstere" or "spstere", and axes=False set to turn off x and y axes plotting, the country borders go out-of-scope of the circular plotting area for the data appearing to be square with the same height/width as the circle diameter (see example images below), so ultimately they are unaligned with the data. Note this issue does not affect other projections (as tested), only these polar ones.

May be related to #55, which also concerns incorrect plot output with the polar stereographic projections, but doesn't look immediately similar in terms of user-facing/plot outcome issue.

MRE with environment

import cfplot as cfp
import cf

cf.environment()

f = cf.read(f"{PATH}/ggap.nc")[0]

cfp.gopen(file="mre-1.png")
cfp.mapset(proj="npstere")  # or set with "spstere" instead
cfp.con(
    f.subspace(pressure=850),
    axes=False,
)
cfp.gclose()
Outputs from MRE

With the axes=False line in, the issue occurs:

npstere

mre-1

spstere

mre-2

Working cases, for comparison

Whereas without axes=False, everything is OK:

mre-1works
mre-2works

主要语言
Python
星标
21
派生
11
平均合并
7 小时 11 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

NCAS-CMS/cf-plot 的其他 Issue

查看 NCAS-CMS/cf-plot 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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