diff --git a/doc/user_guide/compound_charts.rst b/doc/user_guide/compound_charts.rst index 32cd39621..7c12ac760 100644 --- a/doc/user_guide/compound_charts.rst +++ b/doc/user_guide/compound_charts.rst @@ -270,8 +270,24 @@ The :meth:`Chart.repeat` method is the key here: it lets you specify a set of encodings for the row and/or column which can be referred to in the chart's encoding specification using ``alt.repeat('row')`` or ``alt.repeat('column')``. -Currently ``repeat`` can only be specified for rows and column (not, e.g., for -layers) and the target can only be encodings (not, e.g., data transforms) +Another option to use the ``repeat`` method is for layering. Here below the +columns ``US_Gross`` and ``Worldwide_Gross`` are layered on the ``y``-axis +using ``alt.repeat('layer')``: + +.. altair-plot:: + + import altair as alt + from vega_datasets import data + + source = data.movies() + + alt.Chart(source).mark_line().encode( + x=alt.X("IMDB_Rating", bin=True), + y=alt.Y(alt.repeat('layer'), aggregate='mean', title="Mean of US and Worldwide Gross"), + color=alt.ColorDatum(alt.repeat('layer')) + ).repeat(layer=["US_Gross", "Worldwide_Gross"]) + +Currently ``repeat`` can only be encodings (not, e.g., data transforms) but there is discussion within the Vega-Lite community about making this pattern more general in the future. diff --git a/doc/user_guide/encoding.rst b/doc/user_guide/encoding.rst index b761f153d..f02558643 100644 --- a/doc/user_guide/encoding.rst +++ b/doc/user_guide/encoding.rst @@ -57,6 +57,8 @@ xError :class:`XError` The x-axis error value N/A yError :class:`YError` The y-axis error value N/A xError2 :class:`XError2` The second x-axis error value N/A yError2 :class:`YError2` The second y-axis error value N/A +theta :class:`Theta` The start arc angle :ref:`gallery_radial_chart` +theta2 :class:`Theta2` The end arc angle (radian) :ref:`gallery_pacman_chart` ========== =================== ================================= =================================== Mark Property Channels: @@ -68,6 +70,7 @@ color :class:`Color` The color of the mark :ref:`gal fill :class:`Fill` The fill for the mark :ref:`gallery_ridgeline_plot` fillopacity :class:`FillOpacity` The opacity of the mark's fill N/A opacity :class:`Opacity` The opacity of the mark :ref:`gallery_horizon_graph` +radius :class:`Radius` The radius or the mark :ref:`gallery_radial_chart` shape :class:`Shape` The shape of the mark :ref:`gallery_us_incomebrackets_by_state_facet` size :class:`Size` The size of the mark :ref:`gallery_table_bubble_plot_github` stroke :class:`Stroke` The stroke of the mark N/A diff --git a/doc/user_guide/marks.rst b/doc/user_guide/marks.rst index b2a2cd4d7..4fbcf547c 100644 --- a/doc/user_guide/marks.rst +++ b/doc/user_guide/marks.rst @@ -15,6 +15,7 @@ Altair provides a number of basic mark properties: ========== ============================ =================================================== ==================================== Mark Name Method Description Example ========== ============================ =================================================== ==================================== +arc :meth:`~Chart.mark_arc` A pie chart. :ref:`gallery_pie_chart` area :meth:`~Chart.mark_area` A filled area plot. :ref:`gallery_simple_stacked_area_chart` bar :meth:`~Chart.mark_bar` A bar plot. :ref:`gallery_simple_bar_chart` circle :meth:`~Chart.mark_circle` A scatter plot with filled circles. :ref:`gallery_one_dot_per_zipcode`