Adding restyle buttons to a plotly.js json file so they show up

So I have been having issues getting a updatemenus restyle buttons to show up on my ployly.js graph. Usually I can figure this out but there are very few examples of this on the web for plotly.js. So after 4 hours of trying I am here to see if I can get some help.

The way I do this is to create a json file and then use the below javascript code

function graphjsonfile (jsonfile1,divId1) {
Plotly.d3.json(jsonfile1, function(err, fig1) {
var config = {responsive: true};
Plotly.newPlot(divId1, fig1, config);
});
}

And call this script using

% filename div ID
graphjsonfile(‘rsp01_signal.json’,‘SUMMARYID’)

where the json file contains all the info needed to create the graph.

The graph and lines show up but no buttons. I can not figure out if I have the updatemenus formated incorrectly or if I don’t have the position done correctly.

The json file text is …

Any help would be greatly appreciated. Or if you have an json file that I can plot that has buttons that would be create too. Then I can use the console.log to figure out where I am going wrong.

{“data”:[{“type”:“scatter”,“mode”:“lines”,“text”:“T2 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.400 fLCor=0.96886”,“name”:“T2”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.50411888127366922,0.50232582105218171,0.49524323317727692,0.4955121922104837,0.50671881859484813,0.5136221004476198,0.52698039909776639,0.48833995132450525,0.4994569246977818,0.52500803285411735],“line”:{“color”:“rgb(0, 0, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T2 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.400 fLCor=0.96886”,“name”:“T2”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.52940103039676956,0.53226992675116946,0.50824291978312885,0.56732425408142717,0.53002860147428521,0.48152632248284988,0.52088399434467192,0.53720084236029209,0.52115295337789291,0.46924385996558726],“line”:{“color”:“rgb(0, 0, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T2 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.400 fLCor=0.96886”,“name”:“T2”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.515504813680181,0.45283735893890764,0.51003598000461636,0.51613238475769663,0.45839584562553171,0.51416001851406179,0.47865742612843576,0.56051062523972917,0.516670302824167,0.50349131019616777],“line”:{“color”:“rgb(0, 0, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T9 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.410 fLCor=0.96929”,“name”:“T9”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.46704482052015805,0.46499037116302588,0.48096942171848411,0.50912298698280267,0.47853451877668363,0.50569890472091572,0.49588320223688243,0.50782944479497871,0.49230693854113383,0.48401305039570275],“line”:{“color”:“rgb(192, 256, 64)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T9 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.400 fLCor=0.96886”,“name”:“T9”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.46780572768946627,0.47305598715770714,0.43805425736960046,0.47929542594600605,0.51566678863882487,0.49656801868923139,0.33913632535978877,0.38661693272449327,0.39749790524557227,0.45175058641709143],“line”:{“color”:“rgb(192, 256, 64)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T9 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.410 fLCor=0.96929”,“name”:“T9”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.46704482052015805,0.48660013477132225,0.46430555471064849,0.49664410940619064,0.45327240075572206,0.47883888164440691,0.47701270443809562,0.48218687318936304,0.50037255453577245,0.48317605250946372],“line”:{“color”:“rgb(192, 256, 64)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T6 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.470 fLCor=0.97189”,“name”:“T6”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[1.2607722060802757,1.3545266581642181,1.254426380720929,1.237435945081188,1.2929107409649987,1.1825752613290206,1.3483855368486388,1.2464429230107044,1.2065256344596946,1.2429629542652378],“line”:{“color”:“rgb(0, 256, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T6 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.470 fLCor=0.97189”,“name”:“T6”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[1.2239254781870272,1.2300665995026066,1.2521746362385215,1.304169463376752,1.223720774143203,1.2538122685893427,1.2857460994300709,1.1643566014263342,1.2439864744844726,1.2439864744844726],“line”:{“color”:“rgb(0, 256, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T6 Lu lamp: OL425L10 NIST Lamp fL = 23.12 log_fL = 22.480 fLCor=0.97232”,“name”:“T6”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[1.276329713412963,1.2863602115617141,1.2425535461775326,1.2972095258858189,1.273668560842907,1.2014080333633501,1.2587251656417493,1.1739776914873232,1.1966998403548814,1.2755108972376092],“line”:{“color”:“rgb(0, 256, 256)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T13 Lu lamp: OL425L10 NIST Lamp fL = 1 log_fL = 22.480 fLCor=1”,“name”:“T13”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.63072971248533349,0.65476614948815381,0.6282353652491679,0.67630823925486538,0.6541992523890201,0.64002682491090468,0.684358178062439,0.65215842283217285,0.69286163454924576,0.64376834576512465],“line”:{“color”:“rgb(256, 64, 0)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T13 Lu lamp: OL425L10 NIST Lamp fL = 1 log_fL = 22.480 fLCor=1”,“name”:“T13”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.57483365851166468,0.574153381992744,0.60601299896347882,0.57290620837466122,0.571999173016053,0.56610344318514194,0.60612637838332262,0.634471233339525,0.58923284482941085,0.65363235528991481],“line”:{“color”:“rgb(256, 64, 0)”,“width”:2,“dash”:“solid”},“visible”:true},{“type”:“scatter”,“mode”:“lines”,“text”:“T13 Lu lamp: OL425L10 NIST Lamp fL = 1 log_fL = 22.480 fLCor=1”,“name”:“T13”,“x”:[1,2,3,4,5,6,7,8,9,10],“y”:[0.6072601725815332,0.59070677728715282,0.57335972605395114,0.63628530405671313,0.59501519524047808,0.65249856109164739,0.60941438155822425,0.64773662545900379,0.57778152342712019,0.61519673196929148],“line”:{“color”:“rgb(256, 64, 0)”,“width”:2,“dash”:“solid”},“visible”:true}],“layout”:{“title”:“MOBY_L274 Lu and/or Es system response signals”,“xaxis”:{“title”:“Pixel”,“titlefont”:{“family”:“Arial, sans-serif”,“size”:18,“color”:“black”},“type”:“linear”,“linecolor”:"#000000",“linewidth”:3,“showgrid”:“true”,“showline”:“true”,“gridcolor”:"#bdbdbd",“gridwidth”:1,“mirror”:“ticks”},“yaxis”:{“title”:“Net Signal (ADU/pix/sec)”,“titlefont”:{“size”:18,“color”:“black”},“type”:“linear”,“linecolor”:"#000000",“linewidth”:3,“showgrid”:“true”,“showline”:“true”,“gridcolor”:"#bdbdbd",“gridwidth”:1,“mirror”:“ticks”},“hovermode”:“closest”,“autosize”:true,“showlegend”:true,“margin”:{“r”:20,“t”:100,“b”:35,“l”:60,“pad”:0},“height”:“800”,“updatemenus”:{“buttons”:[{“args”:{“type”:“linear”},“label”:“Linear”,“method”:“restyle”,“visible”:true},{“args”:{“type”:“log”},“label”:“Log”,“method”:“restyle”,“visible”:true}],“direction”:“left”,“pad”:{“r”:10,“t”:10},“showactive”:true,“type”:“buttons”,“x”:0.1,“xanchor”:“left”,“y”:1.1,“yanchor”:“top”}},“config”:{“responsive”:true}}