Seaborn头衔位置 [英] Seaborn Title Position

查看:55
本文介绍了Seaborn头衔位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此 jointplot 上,我的图形标题的位置非常糟糕.我试过移动 loc ='left right center ,但它不会从其所在位置移动.ve还根据该站点的其他建议尝试了 ax.title.set_position([3,15])之类的东西,但这也丝毫不会动摇它.关于控制标题位置有什么建议吗?

The position of my graph title is terrible on this jointplot. I've tried moving the loc = 'left, right, and center but it doesn't move from the position it's in. I've also tried something like ax.title.set_position([3, 15]) based on other suggestions from this site but that also doesn't move it at all. Any suggestions on controlling the location of the title?

sns.jointplot(leagueWinners_season['Wins'], leagueWinners_season['Goals'], kind = 'reg', color = 'b')
plt.title('Season Winners Goal and Win Regression', loc = 'right', fontsize = 16)

plt.show()

推荐答案

尝试使用

plt.title('Season Winners Goal and Win Regression', y=1.3, fontsize = 16)

您可以通过更改数字在 y 位置上进行操作.此处 y 轴的位置在相对坐标系中,这意味着 y = 1 意味着在图中的最高 y 位置,并且超出1的任何位置意味着将标题进一步提高.

where you can play around with the y position by changing the number. Here the position of y axis is in relative coordinate system which means y=1 means at the highest y position in the plot and anything beyond 1 would mean pushing title further higher.

这篇关于Seaborn头衔位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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