.. This document is auto-generated by the altair-gallery extension. Do not modify directly. .. _gallery_slope_graph: Slope Graph ----------------------- This example shows how to make Slope Graph. .. altair-plot:: :code-below: import altair as alt from vega_datasets import data source = data.barley() # The year here is stored by pandas as an integer. When treating columns as dates, # it is best to use either a string representation or a datetime representation. source.year = source.year.astype(str) alt.Chart(source).mark_line().encode( x='year', y='median(yield)', color='site' ) .. toctree:: :hidden: