set individual ylim of seaborn lmplot columns

前端 未结 1 1196
生来不讨喜
生来不讨喜 2021-01-24 01:02

I\'ve made a lmplot column plot (subplot) using the following commands:

g = sns.lmplot(x=COX, y=\'dX\', data=tidy_data, hue=\'hue\', col=\'comp\', 
col_wrap=8,          


        
相关标签:
1条回答
  • 2021-01-24 01:48

    If you want to be able to alter the ylim of one particular plot in the FacetGrid you have to explicitly create it with g = sns.lmplot(..., sharey=False)

    example:

    tips = sns.load_dataset("tips")
    g = sns.lmplot(x="total_bill", y="tip", col="day", hue="day", data=tips, col_wrap=2, size=3, 
                   sharey=False)
    g.axes[0].set_ylim((0,100))
    

    0 讨论(0)
提交回复
热议问题