just like in subject. I read documentation from plotly but i did not found any helpfull information. Maybe someone know how to add title to each plot in PLOTLY JS ?
Advertisement
Answer
At the moment you can,t set the subplot title directly.
But you can set subplot title using annotation text
.
Hear is a example
JavaScript
x
29
29
1
//Set annotations text in layout configuration
2
annotations: [{
3
text: "First subplot",
4
font: {
5
size: 16,
6
color: 'green',
7
},
8
showarrow: false,
9
align: 'center',
10
x: 0.13, //position in x domain
11
y: 1, //position in y domain
12
xref: 'paper',
13
yref: 'paper',
14
},
15
{
16
text: "Second subplot",
17
font: {
18
size: 16,
19
color: 'orange',
20
},
21
showarrow: false,
22
align: 'center',
23
x: 0.9, //position in x domain
24
y: 1, // position in y domain
25
xref: 'paper',
26
yref: 'paper',
27
}
28
]
29