matplotlib / matplotlib/basemap

pcolormesh does not work with south pole ortho projection

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

还没有人认领这个 Issue。

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

描述

The north pole works fine when setting lat_0=90 but when setting lat_0=-90 it doesn't work. The data shown in the southern projection is nonsense.

Related to #347 and #350 but the workaround described there for the "stereo" projection does not work for the "ortho" projection.

Code to replicate:

```
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt

lons = np.arange(-179.95, 180.01, 0.1)
lats = np.arange(-89.95, 90.01, 0.1)

# m = Basemap(projection='ortho', lon_0=-270, lat_0=-90., resolution='c')
m = Basemap(projection='ortho', lon_0=0, lat_0=90., resolution='c')
data = np.random.random((1800, 3600))
lons, lats = np.meshgrid(lons, lats)
x, y = m(lons, lats)

# data = np.ma.masked_where((x < m.xmin) | (x > m.xmax) | (y < m.ymin) | (y > m.ymax), data)

im = m.pcolormesh(x, y, data, latlon=False, cmap='RdBu')

m.colorbar(im)
m.drawcoastlines()
m.drawcountries()
plt.show()
```

贡献指南

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

从这里开始

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

调研方向

从提供的 Basemap ortho 投影复现开始,通过 pcolormesh 路径比较 lat_0=90 与 lat_0=-90。查看相关 issue #347 和 #350,然后验证南部投影是否能正确显示数据,同时不破坏现有北部投影的行为。

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

评估

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

把新 issue 发到你的邮箱

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