`gclose` shows no view when `gopen` is called with `file` set
@sadielbartholomew ci sta già lavorando.
Dal 14/5/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
The gclose parameter view fails to behave correctly, notably to produce a graphical display window showing the relevant plot when defaulting or set to True or equivalent, only in the case that a gopen call with a set file file name has been provided (a parameter-free gopen() exhibits correct view behaviour). As the below example shows, this affects future calls to gclose, even when another gopen is called between.
Minimal reproducer
Running the below short script shows no graphical window display with the plots, when it should produce two separately from both calls to gopen because the default is view=True and (to double check) when setting that manually nothing changes. Note though that when we remove the file="delme.png" specification to the first gopen call, both plots then are displayed. (Either way, the plots are still saved correctly, just not displayed to the user, as requested from the view parameter.)
PATH_TO_DATASETS = "~/git-repos/cf-plot/cfplot_data"
# Use this import order to avoid seg fault RE ESMF/matplotlib interfacing
import cfplot as cfp
import cf
# Using docs 'Example 1 - basic cylindrical projection' to illustrate issue
cfp.gopen(file="delme.png") # without file=<name> set, viewing works
f=cf.read(f"{PATH_TO_DATASETS}/tas_A1.nc")[0]
cfp.con(f.subspace(time=15))
cfp.gclose()
cfp.gopen() # even if file=<name> set is not set here, view fails still
f=cf.read(f"{PATH_TO_DATASETS}/tas_A1.nc")[0]
cfp.con(f.subspace(time=15))
cfp.gclose(view=True) # try re-stating the default, still viewing won't work
- 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 97 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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Juniper/ansible-junos-stdlib#904 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
pollen-robotics/reachy_mini#1457 ·
I maintainer di solito rispondono entro 1 giorno
-
area:runtime good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WATonomous/wato_f1tenth#39 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
FireDynamics/fdsreader#123 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100