-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add monotone interpolation example (#2644)
* Add line chart with interpolation * Switch line chart to points to use wheat data * Add stroked points * Tidy multi series line chart * Update multi_series_line.py * Update multi_series_line.py * Update line_chart_with_interpolation.py * Delete line_chart_with_stroked_points.py
- Loading branch information
Showing
3 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
Line Chart with Interpolation | ||
----------------------------- | ||
This chart shows a line chart with the path interpolated. A full list of interpolation methods is available `in the documentation <https://altair-viz.github.io/user_guide/generated/core/altair.LineConfig.html?highlight=interpolate#altair-lineconfig>`_. | ||
""" | ||
# category: line charts | ||
import altair as alt | ||
from vega_datasets import data | ||
|
||
source = data.stocks() | ||
|
||
alt.Chart(source).mark_line(interpolate="monotone").encode( | ||
x="date:T", | ||
y="price:Q", | ||
color="symbol:N" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
x='date:T', | ||
y='price:Q', | ||
color='symbol:N' | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters