Altair: First Chart Notebook Code

Importing altair and datasets

Code
import altair as alt

from vega_datasets import data

# Getting Iris Data
iris = data.iris()

Interactive Chart (Zoom and drag Enabled)

Code
alt.Chart(iris)\
   .mark_point()\
   .encode(
      x = 'petalLength',
      y = 'sepalLength',
      color = 'species'
   )\
   .interactive()
Figure 1: Interactive Scatter Plot