Overlaying vertical lines onto a plot in Altair Overlaying vertical lines onto a plot in Altair pandas pandas

Overlaying vertical lines onto a plot in Altair


Try

points = Chart(df).mark_point().encode(y='pounds', x='date')rules = Chart(df).mark_rule().encode(x='date').transform_filter(datum.violation == 'Y')points + rules

Take a look at this link which explains it further