import seaborn as sns
sns.set(style="whitegrid")
# Load the example Titanic dataset
titanic = sns.load_dataset("titanic")
# Draw a nested barplot to show survival for class and sex
g = sns.catplot(x="class", y="survived", hue="sex", data=titanic,
height=6, kind="bar", palette="muted")
g.despine(left=True)
g.set_ylabels("survival probability")
我可能会尝试使用“分组条形图”。有趣的是,seaborn的图库页面有一个很好的example关于它。。。以泰坦尼克号数据为例:
相关问题 更多 >
编程相关推荐