Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Binder <binder_stefan@outlook.com>
  • Loading branch information
joelostblom and binste committed Mar 27, 2023
1 parent 0caa57f commit 3a3a224
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/user_guide/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ for the ordinal structured data.
.. altair-plot::

alt.Chart(data_obj_geojson, title="Vega-Altair - ordinal scale").mark_geoshape().encode(
alt.Color("properties.location:O").scale(alt.Scale(scheme='magma'))
alt.Color("properties.location:O").scale(scheme='magma')
).project(type="identity", reflectY=True)


Expand Down
4 changes: 2 additions & 2 deletions doc/user_guide/encodings/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Channel Options

Each encoding channel accepts a number of **channel options** (see :ref:`user-guide-encoding-channel-options` for details) which can be used to further configure
the chart.
Altair 5.0 introduced an method-based syntax for setting channel options as a more convenient alternative to the traditional attribute-based syntax described in :ref:`attribute-based-attribute-setting` (but you can still use the attribute-based syntax if you prefer)
Altair 5.0 introduced a method-based syntax for setting channel options as a more convenient alternative to the traditional attribute-based syntax described in :ref:`attribute-based-attribute-setting` (but you can still use the attribute-based syntax if you prefer).

.. note::

Expand All @@ -52,7 +52,7 @@ Method-Based Syntax
The method-based syntax replaces *keyword arguments* with *methods*.
For example, an ``axis`` option of the ``x`` channel encoding would traditionally be set using the ``axis`` keyword argument: ``x=alt.X('Horsepower', axis=alt.Axis(tickMinStep=50))``. To define the same :class:`X` object using the method-based syntax, we can instead use the more succinct ``x=alt.X('Horsepower').axis(tickMinStep=50)``.

The same technique works with all encoding channels and all channel options. For example, notice how we make the analogous change with respect to the ``title`` option of the ``y`` channel. The following produces the same chart as the previous example.
The same technique works with all encoding channels and all channel options. For example, notice how we make the analogous change with respect to the ``title`` option of the ``y`` channel. The following produces the same chart as the previous example.

.. altair-plot::
alt.Chart(cars).mark_point().encode(
Expand Down
2 changes: 1 addition & 1 deletion doc/user_guide/large_datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,4 @@ display.
.. _VegaFusion mime renderer: https://vegafusion.io/mime_renderer.html
.. _VegaFusion widget renderer: https://vegafusion.io/widget_renderer.html
.. _vl-convert: https://github.com/vega/vl-convert
.. _altair_saver: http://github.com/altair-viz/altair_saver/
.. _altair_saver: https://github.com/altair-viz/altair_saver/
2 changes: 1 addition & 1 deletion doc/user_guide/marks/area.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ In this example, we are also customizing the overlay. For more information about

source = data.stocks()

alt.Chart(source).transform_filter(alt.datum.symbol=="GOOG").mark_area(
alt.Chart(source).transform_filter(alt.datum.symbol == "GOOG").mark_area(
line={"color": "darkgreen"},
color=alt.Gradient(
gradient="linear",
Expand Down

0 comments on commit 3a3a224

Please sign in to comment.