Use of lambert conformal projection leads to axes limit error
@sadielbartholomew 已经在做这个了。
开始于 2024年10月2日。
评估
这个 Issue 还没有评估数据。
描述
Recently when attempting a contour plot using the lambert conformal 'lcc' map projection, I see a ValueError: Axis limits cannot be NaN or Inf error, though previously we have not seen this sort of issue. I've tried upgrading cartopy and matplotlib but the error still emerges, so needs investigating in case it is a cf-plot issue.
MRE with environment
>>> import cfplot as cfp
>>> import cf
>>>
>> cf.environment(paths=False)
Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.40
HDF5 library: 1.14.2
netcdf library: 4.9.2
udunits2 library: /home/slb93/miniconda3/envs/cf-env-312/lib/libudunits2.so.0
esmpy/ESMF: 8.4.2
Python: 3.12.0
dask: 2024.7.1
netCDF4: 1.6.5
psutil: 5.9.5
packaging: 23.2
numpy: 1.26.4
scipy: 1.14.0
matplotlib: 3.9.2
cftime: 1.6.2
cfunits: 3.3.7
cfplot: 3.3.0
cfdm: 1.11.1.0
cf: 3.16.2
>>>
>>> PATH = "~/git-repos/cf-plot/cfplot/test/cfplot_data"
>>> f = cf.read(f"{PATH}/ggap.nc")[0]
>>> cfp.mapset(proj="lcc")
>>> cfp.con(f.subspace(pressure=850))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 3665, in con
_set_map()
File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 2377, in _set_map
mymap.set_extent(
File "/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/cartopy/mpl/geoaxes.py", line 862, in set_extent
self.set_xlim([x1, x2])
File "/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 3739, in set_xlim
return self.xaxis._set_lim(left, right, emit=emit, auto=auto)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/matplotlib/axis.py", line 1236, in _set_lim
v0 = self.axes._validate_converted_limits(v0, self.convert_units)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 3660, in _validate_converted_limits
raise ValueError("Axis limits cannot be NaN or Inf")
ValueError: Axis limits cannot be NaN or Inf
- 主要语言
- Python
- 星标
- 21
- 派生
- 11
- 平均合并
- 3 小时 36 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NCAS-CMS/cf-plot 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 22/100
-
testing
难度 3/5 1-2 天 新手友好度 58/100
-
docs enhancement
难度 3/5 1-2 天 新手友好度 64/100
-
Add animation hooks into cf-plot可能重新可做 @bnlawrence 于 109 天前认领,目前没有进行中的 PR。 未关闭enhancement
-
Ugly nemo plotting issue可能已有人在做 @bnlawrence 于 8 天前认领。 未关闭bug v35plus
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
collabnix/awesome-mcp-lists#230 ·
维护者通常 9 天内回复
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is built可能已有人在做 @auraseb 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
autowarefoundation/autoware_carla_scenario#342 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
ianktoo/project-monitor#14 ·