Skip to content

Commit 2d07fb9

Browse files
committed
document title as an object with position attributes
1 parent 4538bfc commit 2d07fb9

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Styling Names
3-
plot_url: https://codepen.io/plotly/embed/9c5d7e597190632c7a29dcaddaf69236/?height=547&theme-id=15263&default-tab=result
3+
plot_url: https://codepen.io/plotly/embed/LMxqEM/?height=547&theme-id=15263&default-tab=result
44
language: plotly_js
55
suite: labels
66
order: 0
@@ -21,22 +21,35 @@
2121
};
2222
var data = [trace1, trace2];
2323
var layout = {
24-
title: 'Plot Title',
25-
xaxis: {
26-
title: 'x Axis',
27-
titlefont: {
24+
title: {
25+
text:'Plot Title',
26+
font: {
2827
family: 'Courier New, monospace',
29-
size: 18,
30-
color: '#7f7f7f'
31-
}
28+
size: 24
29+
},
30+
xref: 'paper',
31+
x: 0.05,
32+
},
33+
xaxis: {
34+
title: {
35+
text: 'x Axis',
36+
font: {
37+
family: 'Courier New, monospace',
38+
size: 18,
39+
color: '#7f7f7f'
40+
}
41+
},
3242
},
3343
yaxis: {
34-
title: 'y Axis',
35-
titlefont: {
36-
family: 'Courier New, monospace',
37-
size: 18,
38-
color: '#7f7f7f'
44+
title: {
45+
text: 'y Axis',
46+
font: {
47+
family: 'Courier New, monospace',
48+
size: 18,
49+
color: '#7f7f7f'
50+
}
3951
}
4052
}
4153
};
54+
4255
Plotly.newPlot('myDiv', data, layout);

0 commit comments

Comments
 (0)