防止在 Seaborn Relplot 中共享 Y 轴? [英] Prevent Sharing of Y Axes in Seaborn Relplot?

查看:68
本文介绍了防止在 Seaborn Relplot 中共享 Y 轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让 seaborn 的 relplot 函数在每行上使用不同的 y 轴进行绘图(同时每列共享 x 轴).

I'm having trouble getting seaborn's relplot function to plot with different y axes on each row (while sharing x axes per column).

我可以看到 seaborn 中的 FacetGridcatplot 方法都有一个 sharex/sharey 关键字参数可以解决我的问题,但我找不到类似的relplot 中的一个.

I can see that both the FacetGrid and catplot methods in seaborn have a sharex/sharey keyword argument that would solve my problem, but I can't find a similar one in relplot.

如果我打算通过单独访问 relplot 返回的子图来解决这个问题,有什么方法可以解决吗?我想继续使用 relplot,因为它可以完美地处理图形大小,而 FacetGrid 在该领域存在很多问题.谢谢.

Is there some way I can work around this if it's intended by accessing the subplots returned by relplot individually? I would like to continue using relplot as it handles figure sizing perfectly while FacetGrid has a lot of issues in that area. Thanks.

推荐答案

这可以通过将带有 FacetGrid 关键字参数的字典传递给 relplot 来完成,如下所示:

This can be done by passing a dictionary with FacetGrid keyword arguments to relplot, like this:

facet_kws={'sharey': False, 'sharex': True}

这篇关于防止在 Seaborn Relplot 中共享 Y 轴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆