% Get this figure: fig = getplotlyfig('cimar', 38) % Get this figure's data: fig = getplotlyfig('cimar', 38); fig.data % Add data to this figure: plotly([1, 2], [2, 3], struct('filename', 'Mothers Day FB Distance', 'fileopt', 'extend')) % Get y data of first trace: fig = getplotlyfig('cimar', 38); y1 = fig.data{1}.y % Get figure documentation: https://plotly.com/matlab/get-requests/ % Add data documentation: https://plotly.com/matlab/file-options/ % You can reproduce this figure in MATLAB with the following code! % Learn about API authentication here: https://plotly.com/matlab/getting-started % Find your api_key here: https://plotly.com/settings/api signin('username', 'api_key') trace1 = struct(... 'x', { {'12.973760932944607', '13.965014577259478', '15.014577259475221', '15.947521865889213', '16.96793002915452', '17.988338192419825', '18.93377759266972', '19.97084548104956', '21.020408163265305', '21.9533527696793', '22.973760932944604', '23.994169096209912', '24.927113702623906', '25.97667638483965', '26.997084548104958', '27.959183673469383', '28.950437317784257', '29.999999999999996', '30.93294460641399', '31.982507288629737', '32.97376093294461', '33.965014577259474', '34.95626822157435', '36.005830903790084', '36.93877551020408', '37.98833819241982', '38.97959183673469', '39.91253644314868', '40.96209912536443', '42.011661807580175', '42.944606413994165', '43.96501457725947', '44.981257809246145', '45.918367346938766', '46.967930029154516', '48.00499791753436', '48.950437317784264', '49.94169096209912', '50.99125364431487', '51.92419825072885', '52.9737609329446', '53.96501457725947', '54.9271137026239', '55.94752186588921', '56.997084548104944', '57.93002915451895', '58.97959183673469', '59.97084548104955'} }, ... 'y', { {'203.9885083093312', '235.96550146359203', '251.84503522593286', '257.5653630236228', '229.05901883604832', '229.16434466859465', '255.83878112490018', '283.0579688040781', '289.4304603128978', '293.39022473030604', '290.47744191094085', '321.4278381660224', '344.60289433393365', '357.91703574214966', '369.853347490189', '374.63762164825687', '383.22427275020385', '385.2205067137519', '386.46397334443986', '388.9632254166398', '384.37080207190667', '393.8125839585619', '397.72116665004603', '394.93872858140094', '399.70332197265225', '398.58084366255844', '397.86165975444504', '397.29426119398613', '397.93234626417393', '394.84809733033774', '405.4980025928163', '410.7039320470931', '410.7489585576768', '415.1110746109309', '415.2461415724669', '421.11580352586157', '422.96270333370484', '427.5252095664365', '430.678385179884', '433.3806043256624', '441.9160737016853', '448.13853969296827', '448.92885006834007', '457.6659666453532', '466.6038505082976', '472.3744801168527', '492.47936599186966', '499.25515190266964'} }, ... 'uid', '4f4833', ... 'line', struc), ... 'mode', 'markers', ... 'name', 'Distance to Child', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:34d47a', ... 'ysrc', 'cimar:562:28eeae', ... 'marker', struct(... 'line', struct(... 'color', 'rgb(217, 217, 217)', ... 'width', 0.5), ... 'size', 8, ... 'color', 'rgb(100, 181, 255)'), ... 'error_x', struc), ... 'error_y', struc), ... 'textfont', struc)); trace2 = struct(... 'x', [12.973760932944607, 13.932885107395728, 14.89200928184685, 15.851133456297973, 16.810257630749096, 17.76938180520021, 18.728505979651334, 19.687630154102457, 20.646754328553577, 21.6058785030047, 22.56500267745582, 23.524126851906942, 24.483251026358065, 25.44237520080918, 26.401499375260304, 27.360623549711427, 28.319747724162546, 29.27887189861367, 30.237996073064792, 31.19712024751591, 32.15624442196703, 33.11536859641816, 34.07449277086928, 35.03361694532039, 35.99274111977152, 36.95186529422264, 37.91098946867376, 38.87011364312488, 39.829237817576, 40.78836199202713, 41.74748616647825, 42.706610340929366, 43.665734515380485, 44.62485868983161, 45.58398286428273, 46.54310703873386, 47.50223121318498, 48.4613553876361, 49.420479562087216, 50.37960373653834, 51.33872791098946, 52.29785208544059, 53.256976259891694, 54.21610043434282, 55.17522460879394, 56.134348783245066, 57.093472957696186, 58.052597132147305, 59.01172130659843, 59.97084548104955], ... 'y', [228.97829843708988, 225.12007475580467, 226.06669193959874, 230.8162761109588, 238.48951494772118, 248.32069236069202, 259.649037359421, 271.9103871061353, 284.6291641578318, 297.4106678965334, 309.9336801476825, 321.94338498673534, 333.24460273386035, 343.69533813685, 353.2006427421489, 361.70679145405313, 369.19577328209687, 375.6800962765408, 381.1979066520662, 385.8084220996284, 389.5876792864226, 392.6245955440512, 395.01734474484715, 396.87004736632866, 398.2897747438619, 399.3838675113998, 400.25756823046936, 401.0119682072793, 401.7422684979574, 402.53635510199547, 403.47368834383315, 404.6245064425839, 406.0493432699518, 407.7988602962869, 409.9139927248025, 412.42640981390286, 415.35928938782763, 418.7284065352396, 422.5435364961277, 426.81017173680266, 431.5315532130935, 436.7110158216219, 442.3546480392815, 448.4742657510433, 455.0907002655167, 462.237400519105, 469.9643494679949, 478.34229466850957, 487.4672930455854, 497.465569849257], ... 'fit', struct(... 'rms', 10.225158418837305, ... 'uid', '805005', ... 'corr', 0.9918042315127685, ... 'params', { {... struct(... 'err', 514.8698355389339, ... 'hold', false, ... 'name', 'a', ... 'value', 1593.3437819687083), ... struct(... 'err', 106.14527946004448, ... 'hold', false, ... 'name', 'b', ... 'value', -281.37022784661957), ... struct(... 'err', 8.636821869828283, ... 'hold', false, ... 'name', 'c', ... 'value', 21.513114164878147), ... struct(... 'err', 0.35648424163248676, ... 'hold', false, ... 'name', 'd', ... 'value', -0.7812928003912942), ... struct(... 'err', 0.007908616362106491, ... 'hold', false, ... 'name', 'e', ... 'value', 0.014870575593640743), ... struct(... 'err', 8.983056720162337e-05, ... 'hold', false, ... 'name', 'f', ... 'value', -0.00014374566194034471), ... struct(... 'err', 4.0990574150125277e-07, ... 'hold', false, ... 'name', 'g', ... 'value', 5.605421722382666e-07)... } }, ... 'parent', { {'4f4833'} }, ... 'fitname', 'Col2 - fit', ... 'funcStr', 'a + b*x + c*x^2 + d*x^3 + e*x^4 + f*x^5 + g*x^6', ... 'ninterp', '50', ... 'iterations', 1, ... 'inputxrange', { {'', ''} }, ... 'outputxrange', { {'', ''} }), ... 'uid', '805005', ... 'line', struct(... 'dash', 'solid', ... 'color', 'rgba(28, 69, 135, 0.6)', ... 'width', 2), ... 'name', 'y = 1593 - 281.4*x + 21.51*x^2 - .7813*x^3 + .01487*x^4 - .0001437*x^5 + .0000005606*x^6', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:fc69bd', ... 'ysrc', 'cimar:562:80e1b9', ... 'xaxis', 'x', ... 'yaxis', 'y', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'opacity', 0.8, ... 'textfont', struc)); trace3 = struct(... 'x', [13.1301721550467, 13.664172598119, 14.1332065370526, 14.4157340708344, 14.771966621883, 15.2465661892919, 15.6817811508446, 16.10018743798, 16.59154089129, 16.9871526884486, 17.3828359488894, 17.8574236057513, 18.281022210788, 18.6488079924534, 19.0048880885001, 19.4401387816939, 19.9147621701969, 20.3497770345596, 20.74571220307, 21.1412614698567, 21.5763549438298, 22.0510319297944, 22.5255123917331, 22.9999213903896, 23.4350613154961, 23.8704334962696, 24.3448603607466, 24.7532908841437, 25.0965826258468, 25.4916387959866, 25.9096530559741, 26.4010019152159, 26.7415115913443, 27.1919932538661, 27.6943443958494, 28.1208863948203, 28.6154703713232, 29.0896292484921, 29.5582956619745, 30.1566385815967, 30.590947746048, 31.0650530257553, 31.5388545865134, 31.9335820255552, 32.4865113054912, 32.9601163422233, 33.4336856473144, 33.9074157447903, 34.3733599176742, 34.8549116713832, 35.3284095131921, 35.8020145499242, 36.2758339765028, 36.7495283423377, 37.2231155132493, 37.6964882943143, 38.1699325386616, 38.643448246291, 39.1168210273561, 39.5901938084212, 40.0635665894863, 40.5370108338335, 41.0105265414629, 41.484095846554, 41.957861675671, 42.4315917731469, 42.9051789440585, 43.3552439756453, 43.844674556213, 44.3025469513763, 44.799795615013, 45.2733827859245, 45.7470056884772, 46.220664322671, 46.6943586885058, 47.1680530543406, 47.641961810022, 48.1160134922676, 48.5898507846668, 49.0635630163222, 49.537489637824, 50.0114341251465, 50.48541434411, 50.9592337706886, 51.433178258011, 51.9072120744361, 52.3813054435964, 52.8553154389274, 53.3294028528142, 53.8037046565474, 54.2778813995369, 54.7521296058085, 55.2261634222336, 55.7006260183517, 56.1747848955206, 56.649158162536, 57.1235671611925, 57.5980118914901, 58.0891432981734, 58.4806906211588, 58.9026723694365, 59.3136309064402, 59.6546536889346, 59.9710037732612], ... 'y', [219.870923913043, 225.407608695652, 230.337732919254, 233.220108695652, 237.794384057971, 242.459239130434, 247.364130434782, 252.639751552795, 256.72554347826, 261.039402173913, 265.625, 270.244565217391, 273.835403726708, 279.483695652173, 283.478260869565, 288.51902173913, 293.274456521739, 297.418478260869, 302.961956521739, 307.03804347826, 311.480978260869, 316.440217391304, 320.652173913043, 324.592391304347, 329.211956521739, 334.714673913043, 338.722826086956, 341.779891304347, 347.146739130434, 349.347826086956, 353.132763975155, 357.201086956521, 361.989130434782, 364.945652173913, 367.99301242236, 372.061820652173, 377.717391304347, 380.70652173913, 384.239130434782, 388.009510869565, 389.470108695652, 392.255434782608, 393.885869565217, 394.836956521739, 397.35054347826, 398.233695652173, 398.980978260869, 400.339673913043, 402.092391304347, 403.192934782608, 403.668478260869, 404.551630434782, 406.25, 407.472826086956, 408.28804347826, 408.28804347826, 408.559782608695, 409.103260869565, 409.103260869565, 409.103260869565, 409.103260869565, 409.375, 409.918478260869, 410.665760869565, 412.160326086956, 413.51902173913, 414.334239130434, 415.70652173913, 416.766304347826, 417.826086956521, 418.614130434782, 419.429347826087, 420.380434782608, 421.467391304347, 422.690217391304, 423.91304347826, 425.951086956521, 428.532608695652, 430.298913043478, 431.589673913043, 433.695652173913, 435.869565217391, 438.179347826087, 439.877717391304, 442.051630434782, 444.565217391304, 447.305253623188, 449.728260869565, 452.445652173913, 455.978260869565, 459.035326086956, 462.364130434782, 464.877717391304, 469.021739130434, 472.010869565217, 475.815217391304, 479.755434782608, 483.83152173913, 487.072981366459, 490.217391304347, 494.802989130434, 497.472826086956, 504.211956521739, 507.133152173913], ... 'uid', '3eda14', ... 'fill', 'none', ... 'line', struct(... 'color', 'rgb(67, 67, 67)', ... 'width', 0.5), ... 'mode', 'none', ... 'name', 'Error Bound (Upper)', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:1a8a1e', ... 'ysrc', 'cimar:562:534c1f', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'opacity', 1, ... 'visible', false, ... 'textfont', struc)); trace4 = struct(... 'x', [13.102596261041, 13.4986011062516, 13.8549223908755, 14.1982891690249, 14.5227835152584, 14.9796115255981, 15.2806791870337, 15.636979032673, 15.9933539147585, 16.3495840836977, 16.7454013377926, 17.1807949575508, 17.5370090472515, 17.9328531000771, 18.4075300860417, 18.8430880713489, 19.2388946059514, 19.6740738358631, 20.1561830031729, 20.3074171740559, 20.7425392333419, 21.1871569762456, 21.6520345596432, 22.1267115456078, 22.6011562759054, 23.0756903353057, 23.5502065288854, 23.9849355401194, 24.4992389160449, 24.960766658091, 25.4484499614098, 25.9228589600663, 26.3578166538032, 26.7928886887916, 27.2673691507303, 27.7417066861046, 28.2160978189406, 28.6903996226738, 29.1645942314838, 29.6388067061143, 30.1130370465654, 30.5869636680673, 31.0608366921075, 31.5347990452505, 32.0086899351113, 32.4825808249721, 32.8375568133093, 33.429844495898, 33.9034495326301, 34.3771438984649, 34.8507310693765, 35.3243361061086, 35.7981019352256, 36.2717248377783, 36.7452584112283, 37.2187562530371, 37.6923970214104, 38.1658412657576, 38.6392676442843, 39.1127833519137, 39.586227596261, 40.0674899236772, 40.5329731583912, 41.0063459394563, 41.5035588714518, 41.9924588371494, 42.4270359889089, 42.9009983420518, 43.3747820369893, 43.8485478661064, 44.3221171711974, 44.7958294028528, 45.2694523054054, 45.743236000343, 46.2169125003573, 46.6906604636537, 47.1644977560529, 47.6383171826315, 48.1122080724923, 48.5861882914558, 49.0601685104193, 49.5340653555536, 50.0078430952176, 50.481984106566, 50.9559107280679, 51.4298671259373, 51.8643126661521, 52.4569969699568, 52.9308610610868, 53.4051271331789, 53.8791341508732, 54.3530071749135, 54.7479043392504, 55.4592945144784, 55.8935983191836, 56.4067189777892, 56.7235871709115, 57.1976924506188, 57.6716905354029, 58.1458494125718, 58.6198832289969, 59.0938634479604, 59.5679329960266, 59.9237486779292], ... 'y', [190.013586956521, 195.822010869565, 200.733695652173, 206.385869565217, 211.704192546583, 217.364130434782, 222.173913043478, 227.004076086956, 232.119565217391, 236.684782608695, 241.779891304347, 247.364130434782, 251.868206521739, 257.065217391304, 262.024456521739, 268.233695652173, 273.28804347826, 278.057065217391, 281.277173913043, 286.345108695652, 290.896739130434, 294.055706521739, 299.252717391304, 304.211956521739, 308.28804347826, 312.703804347826, 317.051630434782, 320.108695652173, 325.747282608695, 330.70652173913, 335.122282608695, 339.0625, 342.989130434782, 347.35054347826, 351.5625, 355.230978260869, 359.103260869565, 362.635869565217, 365.760869565217, 368.953804347826, 372.214673913043, 374.320652173913, 376.222826086956, 378.464673913043, 380.434782608695, 382.404891304347, 382.201086956521, 384.375, 385.258152173913, 386.480978260869, 387.296195652173, 388.179347826087, 389.673913043478, 390.625, 391.236413043478, 391.711956521739, 392.730978260869, 393.002717391304, 393.20652173913, 393.75, 394.021739130434, 394.021739130434, 394.021739130434, 394.021739130434, 394.673913043478, 393.716032608695, 396.195652173913, 398.4375, 400, 401.494565217391, 402.241847826087, 403.532608695652, 404.483695652174, 406.046195652173, 407.201086956521, 408.627717391304, 410.39402173913, 412.092391304347, 414.0625, 416.372282608695, 418.682065217391, 420.674818840579, 422.214673913043, 425.135869565217, 427.241847826086, 429.461050724637, 431.440217391304, 435.122282608695, 436.990489130434, 440.387228260869, 442.798913043478, 444.701086956521, 446.297554347826, 451.358695652173, 452.798913043478, 453.940217391304, 458.83152173913, 461.616847826087, 463.994565217391, 466.983695652173, 469.497282608695, 471.807065217391, 474.45652173913, 477.445652173913], ... 'uid', '6bc1a0', ... 'fill', 'tonextx', ... 'line', struct(... 'color', 'rgb(67, 67, 67)', ... 'width', 0.5), ... 'mode', 'none', ... 'name', 'Error Bound (Lower)', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:10d247', ... 'ysrc', 'cimar:562:e4ba7f', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc), ... 'fillcolor', 'rgb(217, 217, 217)'); trace5 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'ceccb0', ... 'line', struc), ... 'name', 'trace 4', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace6 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '154678', ... 'line', struc), ... 'name', 'trace 5', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace7 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '8db1da', ... 'line', struc), ... 'name', 'trace 6', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace8 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'beabb5', ... 'line', struc), ... 'name', 'trace 7', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace9 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'a5a133', ... 'line', struc), ... 'name', 'trace 8', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace10 = struct(... 'x', { {''} }, ... 'y', { {'1593'} }, ... 'uid', '12abb5', ... 'line', struc), ... 'name', 'trace 9', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:160972', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace11 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '95bbe7', ... 'line', struc), ... 'name', 'trace 10', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace12 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '409da1', ... 'line', struc), ... 'name', 'trace 11', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace13 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '68fa1f', ... 'line', struc), ... 'name', 'trace 12', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace14 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'da094f', ... 'line', struc), ... 'name', 'trace 13', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace15 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'deb6f3', ... 'line', struc), ... 'name', 'trace 14', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace16 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'f96be1', ... 'line', struc), ... 'name', 'trace 15', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace17 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'c5ca15', ... 'line', struc), ... 'name', 'trace 16', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace18 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', 'dda0ec', ... 'line', struc), ... 'name', 'trace 17', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace19 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '6bfd9b', ... 'line', struc), ... 'name', 'trace 18', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace20 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '201749', ... 'line', struc), ... 'name', 'trace 19', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); trace21 = struct(... 'x', { {''} }, ... 'y', { {''} }, ... 'uid', '7c8d5e', ... 'line', struc), ... 'name', 'trace 20', ... 'type', 'scatter', ... 'xsrc', 'cimar:562:96f2d2', ... 'ysrc', 'cimar:562:96f2d2', ... 'marker', struct('line', struc)), ... 'error_x', struc), ... 'error_y', struc), ... 'visible', false, ... 'textfont', struc)); data = {trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9, trace10, trace11, trace12, trace13, trace14, trace15, trace16, trace17, trace18, trace19, trace20, trace21}; layout = struct(... 'font', struct(... 'size', 12, ... 'color', '#444', ... 'family', ''Open sans', verdana, arial, sans-serif'), ... 'smith', false, ... 'title', '
The Average Distance between Mother and Child over the Course of a Lifetime', ... 'width', 650, ... 'xaxis', struct(... 'type', 'linear', ... 'dtick', 10, ... 'range', [5, 65], ... 'tick0', 0, ... 'ticks', '', ... 'title', 'Child's Age', ... 'anchor', 'y', ... 'domain', [0, 1], ... 'mirror', false, ... 'nticks', 0, ... 'ticklen', 5, ... 'autotick', true, ... 'position', 0, ... 'showgrid', true, ... 'showline', false, ... 'tickfont', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'zeroline', false, ... 'autorange', false, ... 'gridcolor', 'rgb(255, 255, 255)', ... 'gridwidth', 1, ... 'linecolor', '#444', ... 'linewidth', 1, ... 'rangemode', 'tozero', ... 'tickangle', 'auto', ... 'tickcolor', '#444', ... 'tickwidth', 1, ... 'titlefont', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'overlaying', false, ... 'showexponent', 'all', ... 'zerolinecolor', '#444', ... 'zerolinewidth', 1, ... 'exponentformat', 'B', ... 'showticklabels', true), ... 'yaxis', struct(... 'type', 'linear', ... 'dtick', 100, ... 'range', [0.1, 600], ... 'tick0', 0, ... 'ticks', '', ... 'title', 'Mean Distance to Child [as declared on Facebook] (miles)', ... 'anchor', 'x', ... 'domain', [0, 1], ... 'mirror', false, ... 'nticks', 0, ... 'ticklen', 5, ... 'autotick', true, ... 'position', 0, ... 'showgrid', true, ... 'showline', false, ... 'tickfont', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'zeroline', false, ... 'autorange', false, ... 'gridcolor', 'rgb(255, 255, 255)', ... 'gridwidth', 1, ... 'linecolor', '#444', ... 'linewidth', 1, ... 'rangemode', 'normal', ... 'tickangle', 'auto', ... 'tickcolor', '#444', ... 'tickwidth', 1, ... 'titlefont', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'overlaying', false, ... 'showexponent', 'all', ... 'zerolinecolor', '#444', ... 'zerolinewidth', 1, ... 'exponentformat', 'B', ... 'showticklabels', true), ... 'bargap', 0.2, ... 'boxgap', 0.3, ... 'height', 650, ... 'legend', struct(... 'x', -0.005309734513274336, ... 'y', 0.10303030303030303, ... 'font', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'bgcolor', 'rgba(255, 255, 255, 0)', ... 'xanchor', 'left', ... 'yanchor', 'top', ... 'traceorder', 'normal', ... 'bordercolor', 'rgba(68, 68, 68, 0)', ... 'borderwidth', 0), ... 'margin', struct(... 'b', 80, ... 'l', 80, ... 'r', 80, ... 't', 100, ... 'pad', 0, ... 'autoexpand', true), ... 'barmode', 'group', ... 'boxmode', 'overlay', ... 'autosize', false, ... 'dragmode', 'zoom', ... 'hovermode', 'x', ... 'titlefont', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'separators', '.,', ... 'showlegend', false, ... 'annotations', { {... struct(... 'x', 18.327433628318584, ... 'y', 270.96393939393937, ... 'ax', -38, ... 'ay', -193.75, ... 'tag', '', ... 'font', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'text', 'High School Graduation
(18 yo, 249 miles)', ... 'xref', 'x', ... 'yref', 'y', ... 'align', 'right', ... 'bgcolor', 'rgba(0,0,0,0)', ... 'opacity', 1, ... 'xanchor', 'auto', ... 'yanchor', 'auto', ... 'arrowhead', 1, ... 'arrowsize', 1, ... 'borderpad', 1, ... 'showarrow', true, ... 'arrowcolor', '', ... 'arrowwidth', 0, ... 'bordercolor', '', ... 'borderwidth', 1), ... struct(... 'x', 28.097345132743364, ... 'y', 383.6724242424242, ... 'ax', -13, ... 'ay', -54.5, ... 'tag', '', ... 'font', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'text', 'Age at 1st Marriage -- U.S.
(28 yo, 363 miles)', ... 'xref', 'x', ... 'yref', 'y', ... 'align', 'right', ... 'bgcolor', 'rgba(0,0,0,0)', ... 'opacity', 1, ... 'xanchor', 'auto', ... 'yanchor', 'auto', ... 'arrowhead', 1, ... 'arrowsize', 1, ... 'borderpad', 1, ... 'showarrow', true, ... 'arrowcolor', '', ... 'arrowwidth', 0, ... 'bordercolor', '', ... 'borderwidth', 1), ... struct(... 'x', 29.61007765938234, ... 'y', 10.130565226735413, ... 'ax', -10, ... 'ay', -28.5, ... 'tag', '', ... 'font', struct(... 'size', 0, ... 'color', '', ... 'family', ''), ... 'text', 'Line of Best Fit: R2 = .9837
y = 1593 - 28.1*x +21.51*x^2 - .7813*x^3
+ .01487*x^4 - .0001437*x^5 + .0000005605*x^6 ', ... 'xref', 'x', ... 'yref', 'y', ... 'align', 'right', ... 'bgcolor', 'rgba(0,0,0,0)', ... 'opacity', 1, ... 'xanchor', 'auto', ... 'yanchor', 'auto', ... 'arrowhead', 1, ... 'arrowsize', 1, ... 'borderpad', 1, ... 'showarrow', false, ... 'arrowcolor', 'rgb(102, 102, 102)', ... 'arrowwidth', 0, ... 'bordercolor', '', ... 'borderwidth', 1), ... struct(... 'x', 24.168141592920357, ... 'y', 287.93080808080805, ... 'ax', 75, ... 'ay', -2.5, ... 'tag', '', ... 'font', struct(... 'size', 0, ... 'color', 'rgb(99, 99, 99)', ... 'family', ''), ... 'text', '4 years of undergrad', ... 'xref', 'x', ... 'yref', 'y', ... 'align', 'center', ... 'bgcolor', 'rgba(0,0,0,0)', ... 'opacity', 1, ... 'xanchor', 'auto', ... 'yanchor', 'auto', ... 'arrowhead', 0, ... 'arrowsize', 1, ... 'borderpad', 1, ... 'showarrow', true, ... 'arrowcolor', 'rgb(151, 151, 151)', ... 'arrowwidth', 0, ... 'bordercolor', '', ... 'borderwidth', 1)... } }, ... 'bargroupgap', 0, ... 'boxgroupgap', 0.3, ... 'hidesources', false, ... 'plot_bgcolor', 'rgba(245, 247, 247, 0.8)', ... 'paper_bgcolor', 'rgb(255, 255, 255)'); response = plotly(data, struct('layout', layout)); plot_url = response.url