You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making the hue column of type pd.Categorical, but still numeric, does respect the hue order. But again with empty legend handles. The default palette changes to categorical.
The numeric hue values behave a bit unexpected when somebody wanted to superimpose a stripplot on a boxplot via a catplot. The plots don't align if not all hue values are present in all subplots. It only aligns well for non-numeric hue values of type pd.Categorical.
Anyway, it is a bit surprising that hue_order can be used for subsets, supersets and ordering, but only for strings. (I am not asking to make any changes. I understand it is complicated, where people sometimes interpret numbers as discrete and sometimes as continuous.)
Tested with Seaborn 0.13.2, pandas 2.2.1
When the hue values are numeric,
hue_order
isn't respected in the plot. The legend does respect the order, but with empty legend handles.Making the hue column of type
pd.Categorical
, but still numeric, does respect the hue order. But again with empty legend handles. The default palette changes to categorical.The text was updated successfully, but these errors were encountered: