最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Issue with saving predefined chart as PNG using pygwalker in Spyder - Stack Overflow

programmeradmin0浏览0评论

I’ve created a chart using pygwalker in a Jupyter Notebook:

...

visuals = pyg.walk(df, spec='pygwalker_spec_123456789.json')
visuals.chart_list
Output: ['Chart 1']

What I would like to do is save this predefined "Chart 1" as a PNG file in a Spyder script. Something like this:

visuals = pyg.walk(df, spec='pygwalker_spec_123456789.json')

visuals.save_chart_to_file('Chart 1', "chart_1.png")

But I get the following error:

ValueError: chart_name: Chart 1 not found, please confirm whether to save

When I check visuals.chart_list, it returns an empty list [], even though the 'pygwalker_spec_123456789.json' file contains "Chart 1".

The reason I want to save the PNG via Spyder is to automate the entire process in a script so that my stakeholders receive all the PNG files automatically, without needing me to run the Jupyter notebook first.

Can anyone help me identify the error? Thank you!

pygwalker version 0.4.9.13

发布评论

评论列表(0)

  1. 暂无评论