Upstream cfplot bugs still existing that need addressing

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with the contouring routine and reproduce the standard Mercator plot using default options to isolate the NaN or Inf axis limits error. Compare the title failure with upstream cf-plot issue 122 and determine whether the argument combinations are valid. Done means the reported title and default Mercator plotting failures are resolved and covered by appropriate checks.

Written by the indexing model from the issue text.

Description

bug
  1. There is a hack in the contouring routine to deal with plot titles failing on several plots, this is upstream.

  2. There is a problem with standard mercator plots if you choose the default options and go straight to plotting, it crashes with:

self.set_xlim([x1, x2])
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: File "/Users/bnl28/miniforge3/envs/work26/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 3828, in set_xlim
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: return self.xaxis._set_lim(left, right, emit=emit, auto=auto)
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: File "/Users/bnl28/miniforge3/envs/work26/lib/python3.12/site-packages/matplotlib/axis.py", line 1216, in _set_lim
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: v0 = self.axes._validate_converted_limits(v0, self.convert_units)
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: File "/Users/bnl28/miniforge3/envs/work26/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 3749, in _validate_converted_limits
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: raise ValueError("Axis limits cannot be NaN or Inf")
2026-03-20 08:30:28,617 INFO xconv2.main_window: Worker stderr: ValueError: Axis limits cannot be NaN or Inf

these may be related to calling the plotting routines with inappropriate arguments, or they might be upstream. This is probably best fixed with a complete refactor of the contouring routines upstream so that argument combinations are clear.

Dominant language
Python
Stars
6
Forks
1
Avg merge
1d 4h
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NCAS-CMS/xconv2

All issues in NCAS-CMS/xconv2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.