就像主题一样。 我从 plotly 阅读了文档,但没有找到任何有用的信息。也许有人知道如何在 PLOTLY JS 中为每个情节添加标题?
最佳答案
目前您不能直接设置子图标题。
但是您可以使用 annotation text
设置子图标题。
听到是example
//Set annotations text in layout configuration
annotations: [{
text: "First subplot",
font: {
size: 16,
color: 'green',
},
showarrow: false,
align: 'center',
x: 0.13, //position in x domain
y: 1, //position in y domain
xref: 'paper',
yref: 'paper',
},
{
text: "Second subplot",
font: {
size: 16,
color: 'orange',
},
showarrow: false,
align: 'center',
x: 0.9, //position in x domain
y: 1, // position in y domain
xref: 'paper',
yref: 'paper',
}
]
关于javascript - 如何在 PLOTLY JS 中为每个子图添加标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51592730/