在悬停栏ch上打印编辑名称标记

2024-03-28 22:56:32 发布

您现在位置:Python中文网/ 问答频道 /正文

当您将鼠标悬停在绘图条形图中的条形图上时出现的小标记,如:https://plot.ly/create/?fid=jordanpeterson:380#/名称为“Trace 0”、“Trace 1”等

它是使用布局中的name=\标记控制的。你知道吗

我想改变这些字体的颜色或改变字体的一般。另外,理想情况下,我想控制有多少字符是允许在那里,因为我的会被切断。你知道吗


Tags: namehttps标记名称绘图plot颜色create
1条回答
网友
1楼 · 发布于 2024-03-28 22:56:32

通过empet from community plotly->;使用hoverlabel更新每个跟踪

hoverlabel=dict(bgcolor='set_your_preferred_background_color',
                font=dict(family='Balto',  #or other font family
                          size=11, #or other size
                          color='font_color')
                             )

另请参见:https://plot.ly/python/reference/#bar-hoverlabel。你知道吗

相关问题 更多 >