From 2d07fb93050a132afc7ef8252857065859393cd1 Mon Sep 17 00:00:00 2001 From: michaelbabyn Date: Thu, 20 Dec 2018 13:21:52 -0500 Subject: [PATCH] document title as an object with position attributes --- .../labels/2015-04-09-styling-names.html | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/_posts/plotly_js/layout/labels/2015-04-09-styling-names.html b/_posts/plotly_js/layout/labels/2015-04-09-styling-names.html index 9fba07027192..414a54196c38 100755 --- a/_posts/plotly_js/layout/labels/2015-04-09-styling-names.html +++ b/_posts/plotly_js/layout/labels/2015-04-09-styling-names.html @@ -1,6 +1,6 @@ --- name: Styling Names -plot_url: https://codepen.io/plotly/embed/9c5d7e597190632c7a29dcaddaf69236/?height=547&theme-id=15263&default-tab=result +plot_url: https://codepen.io/plotly/embed/LMxqEM/?height=547&theme-id=15263&default-tab=result language: plotly_js suite: labels order: 0 @@ -21,22 +21,35 @@ }; var data = [trace1, trace2]; var layout = { - title: 'Plot Title', - xaxis: { - title: 'x Axis', - titlefont: { + title: { + text:'Plot Title', + font: { family: 'Courier New, monospace', - size: 18, - color: '#7f7f7f' - } + size: 24 + }, + xref: 'paper', + x: 0.05, + }, + xaxis: { + title: { + text: 'x Axis', + font: { + family: 'Courier New, monospace', + size: 18, + color: '#7f7f7f' + } + }, }, yaxis: { - title: 'y Axis', - titlefont: { - family: 'Courier New, monospace', - size: 18, - color: '#7f7f7f' + title: { + text: 'y Axis', + font: { + family: 'Courier New, monospace', + size: 18, + color: '#7f7f7f' + } } } }; + Plotly.newPlot('myDiv', data, layout);