我在结合使用tight_layout和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选项,导致一个不同于我想要获得的图形。有人知道我怎么解决这个问题吗?
发布于 2020-04-21 21:48:47
尝试添加
plt.subplots_adjust(hspace=0, wspace=0)在tight_layout()之后
https://stackoverflow.com/questions/61342395
复制相似问题