altair logo altair: line chart

1 2 3 4 5 6 7 8 9
Notes

Besides making scatter charts we can also configure altair to generate line charts. Note that the properties remain the same.

The final plot is created via;

days = ['Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat', 'Sun']

(alt.Chart(plot_df)
  .mark_line()
  .encode(x='date', y='births', color=alt.Color('wday', sort=days))
  .properties(width=600, height=250)
  .interactive())