Seaborn学习05:分布图(多坐标显示)

拈花ヽ惹草 提交于 2019-11-29 14:14:27
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt

sns.set(style="white", palette="muted", color_codes=True)
rs = np.random.RandomState(10)
d = rs.normal(size=100)
# 多个坐标显示
f, axes = plt.subplots(nrows=1, ncols=2, figsize=(12, 5))
sns.distplot(d, color="g", hist=False, kde_kws={"shade": True}, ax=axes[0])  # hist是否显示直方图
sns.distplot(d, color="m", ax=axes[1])
plt.show()

显示效果:

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!