From 466a46871ac3452131e637d48be7ebe5b5474382 Mon Sep 17 00:00:00 2001 From: hannah Date: Tue, 11 Feb 2025 13:54:19 -0500 Subject: [PATCH] Backport PR #29601: DOC: Duplicate catergorial values are mapped to the same position --- .../examples/lines_bars_and_markers/categorical_variables.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/galleries/examples/lines_bars_and_markers/categorical_variables.py b/galleries/examples/lines_bars_and_markers/categorical_variables.py index 4cceb38fbd4d..a19a30eda2b2 100644 --- a/galleries/examples/lines_bars_and_markers/categorical_variables.py +++ b/galleries/examples/lines_bars_and_markers/categorical_variables.py @@ -20,7 +20,10 @@ # %% -# This works on both Axes: +# Categorical values are a mapping from names to positions. This means that +# values that occur multiple times are mapped to the same position. See the +# ``cat`` and ``dog`` values "happy" and "bored" on the y-axis in the following +# example. cat = ["bored", "happy", "bored", "bored", "happy", "bored"] dog = ["happy", "happy", "happy", "happy", "bored", "bored"]