带描边点标记的折线图#
此示例显示了一个简单的折线图,其中的点标记颜色不同。
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'
)
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'
)
# No channel encoding options are specified in this chart
# so the code is the same as for the method-based syntax.