- The lines intersect at age 10 here and doesn't go lower than the second 'Survived' line for the rest of the plot.
fig = plt.figure(figsize=(20, 6))
sns.kdeplot(x='Age', hue='Survived', data=train, shade=True)
plt.xlim(0,train["Age"].max())
plt.show()
- The lines intersect around age 17 here, again at age 30, before the final intersection at age 60.
fac = sns.FacetGrid(train,hue = "Survived", aspect = 5)
fac.map(sns.kdeplot,'Age',shade=True)
fac.set(xlim=(0,train["Age"].max()))
fac.add_legend()