_map_title crashes for orthographic maps with UnboundLocalError: xpt
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- data-visualization
Direzione di ricerca
Inizia individuando _map_title e riproduci il ortho contour plot minimo con un titolo non vuoto usando le impostazioni predefinite indicate. Traccia il modo in cui xpt e ypt vengono assegnati per ogni proiezione, quindi verifica che i grafici ortografici vengano renderizzati con titoli senza generare un UnboundLocalError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This actually occurs for other plot types as well.
Version: cfplot 3.4.0; python 3.12
Observed behavior:
- Orthographic contour plot crashes when cf-plot tries to render the map title
- If the title is removed, the plot renders successfully
Expected behavior:
- Orthographic contour plots should render with a title
- At minimum, _map_title should not crash if a projection-specific title anchor has not been computed
Minimal failing scenario:
- Projection: ortho
- Default GUI-style settings:
- [lat_0 = 0.0]
- [lon_0 = 0.0
- Render a contour plot with a non-empty title
Probable root cause:
_map_title() appears to compute xpt, ypt only for some projections, then unconditionally uses them in the non-dims branch.
From the installed 3.4.0 source, the title-anchor coordinates are assigned for cases such as:
- npstere
- spstere
- lcc
but later the code does:
else:
halign = "center"
plotvars.mymap.text(
xpt,
ypt,
title,
...
)
For ortho, xpt/ypt do not appear to be initialized before this branch is reached.
- Lingua principale
- Python
- Stelle
- 21
- Fork
- 11
- Merge medio
- 7h 11m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NCAS-CMS/cf-plot
-
testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
-
Add `AGENTS.md` fileApertadocs enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
-
Add animation hooks into cf-plotForse di nuovo libera @bnlawrence l’ha presa 99 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
-
Ugly nemo plotting issueApertabug v35plus
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di NCAS-CMS/cf-plot
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Deepak3699/Ai_Mentor#244 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
btclib-org/btclib-node#1880 ·
I maintainer di solito rispondono entro 1 giorno
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handledForse già presa @khuisman l’ha presa oggi. Apertav0.9.2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
khuisman/mcp-gee-sweet#941 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pyjanitor-devs/pyjanitor#1758 ·
I maintainer di solito rispondono entro 1 giorno
-
bug ready for review
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
odysseus-dev/odysseus#6641 ·
I maintainer di solito rispondono entro 1 giorno