-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Hi, I'd like to highlight that seaborn does not handle hue grouping when the hue variable is not constant inside units. Here is a MWE :
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
df_data = []
for i in range(5):
for j in range(5):
df_data.append(
{
"Traj_id": i,
"Step_id": j,
"X": np.random.random(),
"Y": np.random.random(),
}
)
df = pd.DataFrame(df_data)
sns.lineplot(
data=df,
x="X",
y="Y",
hue="Step_id",
markers=True,
sort=False,
units="Traj_id",
estimator=None, # type: ignore
)
plt.show()
What is expected is color changing along the trajectories, but all I get is a blank figure (with a legend though) without getting any warning or error.
Could be interesting to have this feature to plot trajectory tendencies depending on step conditions.
Metadata
Metadata
Assignees
Labels
No labels