In a simple lineplot from Seaborn sample data, adding a "size" argument to control linewidth automatically adds an artist/handle to the legend generated from the "label" argument.
import seaborn as sns
from matplotlib import pyplot as plt
df = sns.load_dataset('geyser')
fig, ax = plt.subplots()
sns.lineplot(
x=df.waiting,
y=df.duration,
label='Label',
size=3,
ax=ax
)
plt.show()
What is the reason for this behavior, and what can be done to prevent it?



