Iām using the Plotly Node.js API. Where do I assign the title of a chart when using the plotly.getImage method? I know you can do it in graphOptions when you use plotly.plot, but where would I put it in the code below??
var plotly = require('plotly')('username','apiKey');
var fs = require('fs');
var trace1 = {
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
type: "scatter"
};
var figure = { 'data': [trace1] };
var imgOpts = {
format: 'png',
width: 1000,
height: 500
};
plotly.getImage(figure, imgOpts, function (error, imageStream) {
if (error) return console.log (error);
var fileStream = fs.createWriteStream('1.png');
imageStream.pipe(fileStream);
});