0
image enclosd为什么我的seaborn.kdeplot是截断的
我该如何让所有数据显示?现在孩子的情节被切断
这里是我的代码:
# since it is a column and not index we need to set axis to 1
titanic_df['Personstatus'] =
titanic_df[['Age','Sex']].apply(male_female_child,axis=1)
fig = sns.FacetGrid(titanic_df, hue='Personstatus', aspect=4)
fig.map(sns.kdeplot, 'Age', shade=True)
oldest = titanic_df['Age'].max()
fig.set(xlim=(0, 80))
fig.add_legend()
我认为这是因为Seaborn根据最后的映射设置了限制。您可以自己轻松设置y限制,就像您使用xlims,'.set(ylim =(0,0.5))'一样。 – ImportanceOfBeingErnest