diff --git a/tests/examples_methods_syntax/beckers_barley_facet.py b/tests/examples_methods_syntax/beckers_barley_facet.py index d3dcac8946..598183a01a 100644 --- a/tests/examples_methods_syntax/beckers_barley_facet.py +++ b/tests/examples_methods_syntax/beckers_barley_facet.py @@ -25,10 +25,10 @@ .sort('-x') .axis(grid=True), alt.Color('year:N') - .legend(title="Year"), + .title("Year"), alt.Row('site:N') .title("") - .sort(alt.EncodingSortField(field='yield', op='sum', order='descending')) + .sort(field='yield', op='sum', order='descending') ).properties( height=alt.Step(20) ).configure_view(stroke="transparent") diff --git a/tests/examples_methods_syntax/isotype.py b/tests/examples_methods_syntax/isotype.py index 92850b729a..a88dd37d1e 100644 --- a/tests/examples_methods_syntax/isotype.py +++ b/tests/examples_methods_syntax/isotype.py @@ -69,7 +69,7 @@ alt.Chart(source).mark_point(filled=True, opacity=1, size=100).encode( alt.X('x:O').axis(None), alt.Y('animal:O').axis(None), - alt.Row('country:N').header(title=''), + alt.Row('country:N').title(''), alt.Shape('animal:N').legend(None).scale(shape_scale), alt.Color('animal:N').legend(None).scale(color_scale), ).transform_window( diff --git a/tests/examples_methods_syntax/layered_chart_with_dual_axis.py b/tests/examples_methods_syntax/layered_chart_with_dual_axis.py index d14fbca57e..8c9877ac8f 100644 --- a/tests/examples_methods_syntax/layered_chart_with_dual_axis.py +++ b/tests/examples_methods_syntax/layered_chart_with_dual_axis.py @@ -11,7 +11,7 @@ source = data.seattle_weather() base = alt.Chart(source).encode( - alt.X('month(date):T').axis(title=None) + alt.X('month(date):T').title('') ) area = base.mark_area(opacity=0.3, color='#57A44C').encode( diff --git a/tests/examples_methods_syntax/scatter_with_layered_histogram.py b/tests/examples_methods_syntax/scatter_with_layered_histogram.py index 995766ead0..2cec759022 100644 --- a/tests/examples_methods_syntax/scatter_with_layered_histogram.py +++ b/tests/examples_methods_syntax/scatter_with_layered_histogram.py @@ -37,8 +37,8 @@ ).add_params(selector) points = base.mark_point(filled=True, size=200).encode( - x=alt.X('mean(height):Q').scale(domain=[0,84]), - y=alt.Y('mean(weight):Q').scale(domain=[0,250]), + alt.X('mean(height):Q').scale(domain=[0,84]), + alt.Y('mean(weight):Q').scale(domain=[0,250]), color=alt.condition( selector, 'gender:N', @@ -47,13 +47,13 @@ ) hists = base.mark_bar(opacity=0.5, thickness=100).encode( - x=alt.X('age') + alt.X('age') .bin(step=5) # step keeps bin size the same .scale(domain=[0,100]), - y=alt.Y('count()') + alt.Y('count()') .stack(None) .scale(domain=[0,350]), - color=alt.Color('gender:N', scale=color_scale) + alt.Color('gender:N').scale(color_scale) ).transform_filter( selector ) diff --git a/tests/examples_methods_syntax/seattle_weather_interactive.py b/tests/examples_methods_syntax/seattle_weather_interactive.py index 46b7448e4c..8c59a83d9f 100644 --- a/tests/examples_methods_syntax/seattle_weather_interactive.py +++ b/tests/examples_methods_syntax/seattle_weather_interactive.py @@ -11,11 +11,10 @@ source = data.seattle_weather() -scale = alt.Scale( +color = alt.Color('weather:N').scale( domain=['sun', 'fog', 'drizzle', 'rain', 'snow'], range=['#e7ba52', '#a7a7a7', '#aec7e8', '#1f77b4', '#9467bd'] ) -color = alt.Color('weather:N', scale=scale) # We create two selections: # - a brush that is active on the top panel