mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-04-21 18:23:35 +00:00
17 lines
285 B
Python
17 lines
285 B
Python
"""
|
|
Slope Graph
|
|
-----------------------
|
|
This example shows how to make Slope Graph.
|
|
"""
|
|
# category: line charts
|
|
import altair as alt
|
|
from vega_datasets import data
|
|
|
|
source = data.barley()
|
|
|
|
alt.Chart(source).mark_line().encode(
|
|
x='year:O',
|
|
y='median(yield)',
|
|
color='site'
|
|
)
|