August 2019
Beginner
482 pages
12h 56m
English
One simple way to export your chart as a raster or vector image is via the triple-dot button. But you can also do this programmatically if you need to. First, we need to store the composite chart as an object. Next, we just execute the save; the method-specific type of export will be inferred from the file type:
chart = basemap + pointschart.save('chart.png') # or 'chart.svg' for vectorProgrammatic export for both png and svg requires the Selenium package and either Google Chrome or Mozilla Firefox browser, plus a corresponding driver to be installed—check the documentation via https://altair-viz.github.io/user_guide/saving_charts.html#png-and-svg-format.
An alternative to this is to store a raw specification. ...