Fix nominal color scaling with integer levels #3949

Stale Open
its-amann opened 11:41am on June 28, 2026 wants to merge 28 Ξ” into mwaskom/seaborn master from
fix-objects-nominal-color-scale
Diff Delta:
28
About 51 Diff Delta/hour
Classified as:  Bug Fix

its-amann's Description of Work

Closes #3375.

This keeps nominal color scales aligned with their level order when integer color values are used across multiple layers. Coordinate scales still use matplotlib unit conversion so shared categorical axes keep their existing behavior.

Tests:
- python -m pytest tests/_core/test_plot.py::TestScaling::test_nominal_integer_color_scale_multiple_layers tests/_core/test_plot.py::TestScaling::test_pair_categories_shared tests/_core/test_scales.py::TestNominal -q
- python -m pytest tests/_core/test_scales.py tests/_core/test_properties.py::TestColor tests/_marks/test_dot.py -q
- python -m pytest tests/_core/test_plot.py -q -k "not test_show"
- python -m pytest tests/_core -q -k "not test_show"

2 total changed files
Loading changes...
Loading changes...
You are now leaving the Pull Request Diff Zone
All files reviewed β€” nice work, champ! πŸ’ͺ