相关疑难解决方法(0)

Seaborn:如何用多个折线图制作子图?sns.relplot 似乎不支持?

seaborn 文档区分了图形级函数和轴级函数:https://seaborn.pydata.org/introduction.html#figure-level-and-axes-level-functions

我知道像 sns.boxplot 这样的函数可以将轴作为参数,因此可以在子图中使用。

但是 sns.relplot() 怎么样?有没有办法把它放到子图中?

更一般地说,有什么方法可以让seaborn在子图中生成线图吗?

例如,这不起作用:

fig,ax=plt.subplots(2)
sns.relplot(x,y, ax=ax[0])
Run Code Online (Sandbox Code Playgroud)

因为 relplot 不将轴作为参数。

python matplotlib seaborn

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

matplotlib ×1

python ×1

seaborn ×1