Minimum working example:
import numpy as np
import seaborn as sns
import pandas as pd
data = pd.DataFrame()
data['x'] = np.random.random((100,))
data['y'] = np.random.random((100,))
data['hue'] = np.random.choice(['hue1', 'hue2', 'hue3'], (100,))
sns.scatterplot(
data=data,
x='x',
y='y',
hue='hue',
size=1,
)
Result:

I'm not entirely sure what's going on here, and it's possible that it's an error on my part. There seems to be many different types of behaviour depending on the usage of hue, size, and s:
sns.scatterplot(..., size=1, ...) (item added to legend)

sns.scatterplot(..., hue='hue', size=1, ...) (item added to legend)

sns.scatterplot(..., hue='hue', s=1, ...) (no extra legend item)

sns.scatterplot(..., hue='hue', ...)(no extra legend item)

I'd expect that adding size=1 would not add an item 1 to the legend. Not sure if this is a bug or if I'm using the interface wrong though.
Minimum working example:
Result:
I'm not entirely sure what's going on here, and it's possible that it's an error on my part. There seems to be many different types of behaviour depending on the usage of
hue,size, ands:sns.scatterplot(..., size=1, ...)(item added to legend)sns.scatterplot(..., hue='hue', size=1, ...)(item added to legend)sns.scatterplot(..., hue='hue', s=1, ...)(no extra legend item)sns.scatterplot(..., hue='hue', ...)(no extra legend item)I'd expect that adding
size=1would not add an item1to the legend. Not sure if this is a bug or if I'm using the interface wrong though.