Python Seaborn jointplot选项因紧密布局而被删除

Python Seaborn jointplot选项因紧密布局而被删除,python,matplotlib,seaborn,Python,Matplotlib,Seaborn,我有一个与紧_布局结合使用jointplot的问题。我有一个数据框df,数据分为两列 我使用以下命令创建jointplot: import seaborn as sns import numpy as np import matplotlib.pyplot as plt sns.jointplot(df["time (ns)"],df["intesity (counts/s)"], kind='kde', shade=True, cmap="RdBu_r", n_levels=1000,

我有一个与紧_布局结合使用jointplot的问题。我有一个数据框
df
,数据分为两列

我使用以下命令创建jointplot:

import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt    
sns.jointplot(df["time (ns)"],df["intesity (counts/s)"], kind='kde', shade=True, cmap="RdBu_r", n_levels=1000, space=0)
问题是轴标签部分位于图形之外:我使用

plt.tight_layout()
无论如何,这会产生“擦除”
space=0
选项的副作用,导致图形与我希望获得的图形不同。有人知道我如何解决这个问题吗?

尝试添加

plt.subplots_adjust(hspace=0, wspace=0)

tight\u layout()

之后,虽然这段代码可以回答这个问题,但最好包含一些上下文,解释它是如何工作的以及何时使用它。从长远来看,只使用代码的答案是没有用的。