作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的图表标题在这个jointplot
上的位置很糟糕。我尝试移动 loc = 'left
、right
和 center
,但它没有从原来的位置移动。I'我们还根据本网站的其他建议尝试了类似 ax.title.set_position([3, 15])
的方法,但这也根本没有改变它。关于控制标题位置有什么建议吗?
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 的位置这意味着将头衔进一步推高。
关于python - Seaborn 头衔位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52096050/
我是一名优秀的程序员,十分优秀!