#!/usr/bin/env python # coding: utf-8 # In[10]: import altair as alt from vega_datasets import data # In[11]: iris = data.iris() chart = alt.Chart(iris).mark_point().encode( x='petalLength', y='petalWidth', color='species' ) # In[9]: chart.display() # In[13]: chart.save('output/example_chart.html') # The following requires the `selenium` Python package and the `chromedriver` executable to be installed. # In[14]: chart.save('output/example_chart.svg') # In[15]: chart.serve() # In[ ]: