Python Plotly:如何避免图表被截断

问题描述 投票:0回答:1

我有一个图表,其注释有 10 行长,但已被截断。我尝试增加布局的高度,它只增加了图表的高度,但截断问题仍然存在。 我在下面添加了一张图片来表达我的意思:

任何有关如何避免截断的想法都值得赞赏。谢谢!

编辑: 我尝试使用建议的 Fig.update_yaxes(domain=[0.25, 1.0]) 结果现在看起来像:

python plotly annotations
1个回答
0
投票

看起来部分是由于保证金问题造成的。试试这个:

fig.update_layout(margin=dict(t=20,
                              b=200, #play around with the spacing as needed
                              l=20,
                              r=20)
                  )
© www.soinside.com 2019 - 2024. All rights reserved.