小编ejl*_*l62的帖子

如何在 Seaborn FacetGrid 中更改子图标题和轴标签的位置?

我正在尝试使用 Seaborn 的 facetGrid 绘制极坐标图,类似于seaborn 画廊中的详细信息, 我正在使用以下代码:

sns.set(context='notebook', style='darkgrid', palette='deep', font='sans-serif', font_scale=1.25)

# Set up a grid of axes with a polar projection
g = sns.FacetGrid(df_total, col="Construct", hue="Run", col_wrap=5,    subplot_kws=dict(projection='polar'), size=5, sharex=False, sharey=False, despine=False)

# Draw a scatterplot onto each axes in the grid
g.map(plt.plot, 'Rad', ''y axis label', marker=".", ms=3,   ls='None').set_titles("{col_name}")

plt.savefig('./image.pdf')
Run Code Online (Sandbox Code Playgroud)

我的数据给出了以下内容:

在此处输入图片说明

我想保持这种每行 5 个地块的组织。

问题是每个子图的标题与刻度值重叠,y 轴标签也是如此。

有没有办法防止这种行为?我可以以某种方式将标题稍微移动到其当前位置上方,我可以将 y 轴标签稍微移动到当前位置的左侧吗?

提前谢谢了!

编辑: 这不是这个的副本SO的问题是一个插曲的标题重叠的轴标签的另一个插曲。

在这里我的问题是,与蜱子情节重叠标题标签同样次要情节和同样轴标签重叠与蜱的标签相同的插曲。

我还想补充一点,我不在乎它们在我的 jupyter 笔记本上重叠(因为它是用它创建的),但是我希望最终 …

python plot matplotlib polar-coordinates seaborn

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

标签 统计

matplotlib ×1

plot ×1

polar-coordinates ×1

python ×1

seaborn ×1