`gclose` shows no view when `gopen` is called with `file` set
@sadielbartholomew 已经在做这个了。
开始于 2024年5月14日。
评估
这个 Issue 还没有评估数据。
描述
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
- 主要语言
- Python
- 星标
- 21
- 派生
- 11
- 平均合并
- 7 小时 11 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NCAS-CMS/cf-plot 的其他 Issue
-
testing
难度 3/5 1-2 天 新手友好度 58/100
-
docs enhancement
难度 3/5 1-2 天 新手友好度 64/100
-
Add animation hooks into cf-plot可能重新可做 @bnlawrence 于 97 天前认领,目前没有进行中的 PR。 未关闭enhancement
-
bug v35plus
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
area:docs
难度 2/5 1-3 小时 新手友好度 72/100
RailtownAI/railtracks#1633 ·
维护者通常 2 天内回复
-
review-panel severity:low
难度 1/5 1 小时以内 新手友好度 85/100
kristovatlas/coin-accounting#152 ·
维护者通常 1 天内回复
-
documentation :blue_book:
难度 1/5 1 小时以内 新手友好度 88/100
PennyLaneAI/pennylane#10280 ·
维护者通常 2 天内回复
-
`pipx reinstall` prints a Python traceback when the reinstall fails可能已有人在做 @ParamTanna 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复