Country borders out of scope for polar projections w/ `axes=False`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start by running the provided minimal reproduction with cfp.mapset(proj="npstere" or "spstere") and cfp.con(..., axes=False), then compare it with axes enabled. Trace the polar projection setup and country-border rendering to identify why the borders use bounds outside the circular plotting area. Done means both polar cases align borders with the data circle while other projections remain unchanged.
Written by the indexing model from the issue text.
Description
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
spstere
Working cases, for comparison
Whereas without axes=False, everything is OK:
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NCAS-CMS/cf-plot
-
Add badges to READMEOpendocs
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
dependencies infrastructure installation testing
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 3/5 Half a day Newbie friendliness 45/100
-
`title` not showing for `con` with certain projectionsPossibly taken @sadielbartholomew claimed this 1 day ago. Openbug plotting
All issues in NCAS-CMS/cf-plot
Similar issues
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged inPossibly taken @Rarasinhoo claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pgadmin-org/pgadmin4#10733 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws-samples/sample-per-model-bedrock#752 ·
Maintainers usually reply within 1 day
-
lesson-submission pending-review
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Ikalus1988/MisakaNet#4452 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OCHA-DAP/topo-tools#250 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day