vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
96 stars 12 forks source link

Unable to save PNG #56

Closed stevenlis closed 1 year ago

stevenlis commented 1 year ago

I'm not able to save png with vl_convert '0.9.0' in altair '4.2.2'. I check my conda list, and vl_convert '0.9.0' is installed. Altair Chart.save() will return

ValueError: Saving charts in 'png' format requires the altair_saver package: see http://github.com/altair-viz/altair_saver/

Btw, I have to install vl_convert via pip since the conda-forge version hasn't supported osx-arm64 (https://github.com/vega/vl-convert/issues/29)

jonmmease commented 1 year ago

Hi @StevenLi-DS, Altair's Chart.save won't support vl-convert until Altair 5 (which is currently available as a release candidate as altair==5.0.0rc2). If you can't update to the release candidate, you'll need to use vl-convert directly by following the instructions here.

stevenlis commented 1 year ago

Hi, @jonmmease Thanks for the reply. Indeed, I didn't realize that. I will give it a try once v5 comes out.

stevenlis commented 1 year ago

@jonmmease Thanks a lot for the work to make such a simple procedure no longer painful. Just tried with altair 5.0.0 and it's indeed working!

https://github.com/vega/vl-convert/assets/33796896/c3a81549-d753-49d6-876b-77895fd4e348