From be56903cb9905a931d8633b0ab6e9e2a08f86800 Mon Sep 17 00:00:00 2001 From: Ben Welsh Date: Thu, 30 Jun 2022 20:05:50 -0700 Subject: [PATCH 1/4] Delete multiple_marks.py --- altair/examples/multiple_marks.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 altair/examples/multiple_marks.py diff --git a/altair/examples/multiple_marks.py b/altair/examples/multiple_marks.py deleted file mode 100644 index e262dd306..000000000 --- a/altair/examples/multiple_marks.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Multiple Marks -============== -This example demonstrates creating a single chart with multiple markers -representing the same data. -""" -# category: other charts -import altair as alt -from vega_datasets import data - -source = data.stocks() - -alt.Chart(source).mark_line(point=True).encode( - x='date:T', - y='price:Q', - color='symbol:N' -) From c9422e9005b6662a1b60b69de717e32f71762ef6 Mon Sep 17 00:00:00 2001 From: Ben Welsh Date: Tue, 5 Jul 2022 07:46:10 -0700 Subject: [PATCH 2/4] Create line_chart_with_points_different_color.py --- .../line_chart_with_points_different_color.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 altair/examples/line_chart_with_points_different_color.py diff --git a/altair/examples/line_chart_with_points_different_color.py b/altair/examples/line_chart_with_points_different_color.py new file mode 100644 index 000000000..fd990d98b --- /dev/null +++ b/altair/examples/line_chart_with_points_different_color.py @@ -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' +) From b52ec9210431431d4ee5f07ced108ff8e54ce82c Mon Sep 17 00:00:00 2001 From: Ben Welsh Date: Tue, 5 Jul 2022 07:53:53 -0700 Subject: [PATCH 3/4] Update line_chart_with_points.py --- altair/examples/line_chart_with_points.py | 26 ++++++++--------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/altair/examples/line_chart_with_points.py b/altair/examples/line_chart_with_points.py index 26bd54310..3e556411a 100644 --- a/altair/examples/line_chart_with_points.py +++ b/altair/examples/line_chart_with_points.py @@ -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' ) From d77e2d285b4aef8af96702a61d56f44ecb95aa6f Mon Sep 17 00:00:00 2001 From: Ben Welsh Date: Tue, 5 Jul 2022 07:54:14 -0700 Subject: [PATCH 4/4] Rename line_chart_with_points_different_color.py to line_chart_with_points_stroked.py --- ...oints_different_color.py => line_chart_with_points_stroked.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename altair/examples/{line_chart_with_points_different_color.py => line_chart_with_points_stroked.py} (100%) diff --git a/altair/examples/line_chart_with_points_different_color.py b/altair/examples/line_chart_with_points_stroked.py similarity index 100% rename from altair/examples/line_chart_with_points_different_color.py rename to altair/examples/line_chart_with_points_stroked.py