Seaborn因子图:将底部改为负值

2024-09-30 22:28:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Seaborn内部创建一个因素图。我有两个不同的组,其中一组的平均值为正值,另一组的平均值为负值。因此,一个杆朝上,另一个朝下。在

g = sns.factorplot(x = "group",y="r_zscore", hue = "age_grp", data = z_score_all_temp, ci = 68, kind = "bar",legend = True,
              aspect = 2, alpha = .7)

Current Plot

我有没有办法把“底部”改成负值,这样两条线都朝上?就像这张图片(我刚给我的值加了0.6):

Desired Plot

在这个例子中,我观察了两个年龄组(1=年轻人,2=老年人)z得分相关系数(r峎zscore)的差异。提前谢谢你的帮助。在


Tags: agedatagroupseabornhue平均值因素score