import matplotlib
import seaborn as sns
import numpy as np
anscombe_df = sns.load_dataset('anscombe')
print(anscombe_df)
print(anscombe_df.groupby('dataset').agg([np.mean, np.var]))
sns.set(style="ticks")
sns.lmplot(x="x", y="y", col="dataset", hue="dataset",
data=anscombe_df, col_wrap=2, ci=None, palette="muted",
size=4, scatter_kws={"s": 50, "alpha": 1})
plt.show()
Seaborn数据可视化
最新推荐文章于 2021-10-22 23:27:31 发布