【发布时间】:2020-11-02 03:32:34
【问题描述】:
在我的代码中,当我用较小的值更改字体大小时,图例框不适应新的大小。你知道我可以添加什么属性来调整盒子的大小吗?
使用的库是 Plotly。
fig.update_layout(showlegend=True, height=500, width=1000, title_text="Analysis of Latency",
legend=dict(
x=0, y=1,traceorder="normal",font=dict(size=10),bgcolor="WhiteSmoke")
【问题讨论】:
-
Change legend size in plotly chart 我觉得这个答案很有帮助
-
您提到的答案遵循我已经拥有的相同代码:legend=dict(font=dict(size=10))(而不是字典,在 R 中它是一个列表)。但是,这种方法只会更改图例框内的字体大小。但是图例框本身的尺寸没有改变。
标签: python plotly data-visualization