Skip to content

Commit

Permalink
Horizontally concatenate color charts for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom committed Oct 7, 2023
1 parent c3c419f commit 2e3809b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/user_guide/encodings/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ Effect of Data Type on Color Scales
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As an example of this, here we will represent the same data three different ways,
with the color encoded as a *quantitative*, *ordinal*, and *nominal* type,
using three vertically-concatenated charts (see :ref:`vconcat-chart`):
using three horizontally-concatenated charts (see :ref:`hconcat-chart`):

.. altair-plot::

base = alt.Chart(cars).mark_point().encode(
x='Horsepower:Q',
y='Miles_per_Gallon:Q',
).properties(
width=150,
height=150
width=140,
height=140
)

alt.vconcat(
alt.hconcat(
base.encode(color='Cylinders:Q').properties(title='quantitative'),
base.encode(color='Cylinders:O').properties(title='ordinal'),
base.encode(color='Cylinders:N').properties(title='nominal'),
Expand Down

0 comments on commit 2e3809b

Please sign in to comment.