matplotlib / matplotlib/basemap

Ortho projection fails at south pole in pcolormesh

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

还没有人认领这个 Issue。

主要语言
Python
星标
817
派生
395
PR 合并指标
30 天内没有已合并 PR

描述

I am plotting gridded satellite data using basemap 1.0.7 (I can't get 1.0.8 via pip yet). The grid is 0.25 degrees resolution, global coverage.

For polar views, I use pcolormesh. It works fine for the north polar view:

```
bmap = Basemap(projection='ortho', lat_0=90, lon_0=270, resolution='c')
show_map = bmap.pcolormesh(lons, lats, darray, vmin=vminval, vmax=vmaxval,
norm=norm, cmap=this_cmap, alpha=1.0, latlon=True)
```

but the corresponding map centered on the south pole plots garbage:

```
bmap = Basemap(projection='ortho', lat_0=-90, lon_0=270, resolution='c')
show_map = bmap.pcolormesh(lons, lats, darray, vmin=vminval, vmax=vmaxval,
norm=norm, cmap=this_cmap, alpha=1.0, latlon=True)
```

However, pcolor plots correctly at the south pole. This one is fine:

```
bmap = Basemap(projection='ortho', lat_0=-90, lon_0=270, resolution='c')
show_map = bmap.pcolor(lons, lats, darray, vmin=vminval, vmax=vmaxval,
norm=norm, cmap=this_cmap, alpha=1.0, latlon=True)
```

In this case, my gridded data array is pretty small and the time difference between pcolormesh and pcolor is negligible, but I'm guessing this is something that ought to be fixed, unless it already has been addressed in 1.0.8.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

调研方向

使用提供的北极和南极 Basemap 示例,通过 pcolormesh 和 pcolor 重现该问题,然后检查 Basemap 的 pcolormesh 实现及其投影处理。修复完成的标准是:南极正射投影 pcolormesh 生成与 pcolor 相同的正确地图,且不会导致北极案例回归。

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

评估

技术栈
matplotlib, python
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

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