Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions altair/examples/line_chart_with_points.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
"""
Line Chart with Points
----------------------
This chart shows a simple line chart with points marking each value. Use
``point=True`` for points with default appearance or customize it with
``OverlayMarkDef()``.
Line Chart with Point Markers
-----------------------------
This chart shows a simple line chart with points marking each value.
"""
# category: line charts
import altair as alt
import numpy as np
import pandas as pd
from vega_datasets import data

x = np.arange(100)
source = pd.DataFrame({
'x': x,
'f(x)': np.sin(x / 5)
})
source = data.stocks()

alt.Chart(source).mark_line(
point=alt.OverlayMarkDef(color="red")
).encode(
x='x',
y='f(x)'
alt.Chart(source).mark_line(point=True).encode(
x='date:T',
y='price:Q',
color='symbol:N'
)
18 changes: 18 additions & 0 deletions altair/examples/line_chart_with_points_stroked.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Line Chart with Stroked Point Markers
-------------------------------------
This example shows a simple line chart with points in a different color.
"""
# category: line charts
import altair as alt
from vega_datasets import data

source = data.stocks()

alt.Chart(source).mark_line(
point=alt.OverlayMarkDef(filled=False, fill="white")
).encode(
x='date:T',
y='price:Q',
color='symbol:N'
)
17 changes: 0 additions & 17 deletions altair/examples/multiple_marks.py

This file was deleted.