|
|
体贴的柿子 · ByteArrayOutputStream导 ...· 1 年前 · |
|
|
近视的熊猫 · 【WPF】如何让弹出的窗口"阻塞" - ...· 2 年前 · |
|
|
机灵的铁链 · unity怎么获取 android ...· 2 年前 · |
|
|
乖乖的小熊猫 · 将一个numpy数组的列表转换成一个numpy数组· 3 年前 · |
|
|
爱听歌的手术刀 · css怎么旋转_51CTO博客_css旋转1 ...· 3 年前 · |
我的图表标题在这个
jointplot
上的位置很糟糕。我尝试过移动
loc = 'left
、
right
和
center
,但它没有从它所在的位置移动。基于这个网站的其他建议,我也尝试过像
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()
发布于 2018-08-30 19:36:16
尝试使用
plt.title('Season Winners Goal and Win Regression', y=1.3, fontsize = 16)
在这里您可以通过更改数字来调整
y
位置。在这里,
y
轴的位置在相对坐标系中,这意味着
y=1
意味着在图中最高的
y
位置,任何超过1的值都意味着将标题推得更高。
发布于 2018-08-30 19:46:01
另一种方法是使用
plt.suptitle
为图形提供居中标题,然后使用
subplots_adjust
在图形顶部为标题留出稍微多一点的空间:
plt.subplots_adjust(top=0.9)
plt.suptitle('Season Winners Goal and Win Regression', fontsize = 16)
https://stackoverflow.com/questions/52096050
复制相似问题
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2024 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号: 粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
|
|
乖乖的小熊猫 · 将一个numpy数组的列表转换成一个numpy数组 3 年前 |