From 4160081dd8b5136ba781039bd2b81588b2b36b4f Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Fri, 17 Aug 2018 16:02:23 -0400 Subject: [PATCH 1/4] support 'e' and 'E' exponentformat on log axes --- src/plots/cartesian/axes.js | 33 +++++++++++++++++---------------- test/jasmine/tests/axes_test.js | 29 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js index d691d3f7911..2b7c02bf237 100644 --- a/src/plots/cartesian/axes.js +++ b/src/plots/cartesian/axes.js @@ -1079,9 +1079,10 @@ function formatDate(ax, out, hover, extraPrecision) { } function formatLog(ax, out, hover, extraPrecision, hideexp) { - var dtick = ax.dtick, - x = out.x, - tickformat = ax.tickformat; + var dtick = ax.dtick; + var x = out.x; + var tickformat = ax.tickformat; + var dtChar0 = typeof dtick === 'string' && dtick.charAt(0); if(hideexp === 'never') { // If this is a hover label, then we must *never* hide the exponent @@ -1093,22 +1094,25 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) { hideexp = ''; } - if(extraPrecision && ((typeof dtick !== 'string') || dtick.charAt(0) !== 'L')) dtick = 'L3'; + if(extraPrecision && (dtChar0 !== 'L')) dtick = 'L3'; - if(tickformat || (typeof dtick === 'string' && dtick.charAt(0) === 'L')) { + if(tickformat || (dtChar0 === 'L')) { out.text = numFormat(Math.pow(10, x), ax, hideexp, extraPrecision); } - else if(isNumeric(dtick) || ((dtick.charAt(0) === 'D') && (Lib.mod(x + 0.01, 1) < 0.1))) { + else if(isNumeric(dtick) || ((dtChar0 === 'D') && (Lib.mod(x + 0.01, 1) < 0.1))) { var p = Math.round(x); - if(['e', 'E', 'power'].indexOf(ax.exponentformat) !== -1 || - (isSIFormat(ax.exponentformat) && beyondSI(p))) { + var absP = Math.abs(p); + var exponentFormat = ax.exponentformat; + if(exponentFormat === 'power' || (isSIFormat(exponentFormat) && beyondSI(p))) { if(p === 0) out.text = 1; else if(p === 1) out.text = '10'; - else if(p > 1) out.text = '10' + p + ''; - else out.text = '10' + MINUS_SIGN + -p + ''; + out.text = '10' + (p > 1 ? '' : MINUS_SIGN) + absP + ''; out.fontSize *= 1.25; } + else if((exponentFormat === 'e' || exponentFormat === 'E') && absP > 2) { + out.text = '1' + exponentFormat + (p > 0 ? '+' : MINUS_SIGN) + absP; + } else { out.text = numFormat(Math.pow(10, x), ax, '', 'fakehover'); if(dtick === 'D1' && ax._id.charAt(0) === 'y') { @@ -1116,7 +1120,7 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) { } } } - else if(dtick.charAt(0) === 'D') { + else if(dtChar0 === 'D') { out.text = String(Math.round(Math.pow(10, Lib.mod(x, 1)))); out.fontSize *= 0.75; } @@ -1332,11 +1336,8 @@ function numFormat(v, ax, fmtoverride, hover) { else if(exponentFormat !== 'power') signedExponent = '+' + exponent; else signedExponent = String(exponent); - if(exponentFormat === 'e') { - v += 'e' + signedExponent; - } - else if(exponentFormat === 'E') { - v += 'E' + signedExponent; + if(exponentFormat === 'e' || exponentFormat === 'E') { + v += exponentFormat + signedExponent; } else if(exponentFormat === 'power') { v += '×10' + signedExponent + ''; diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index 0ad2d656877..06e593da385 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -1941,6 +1941,35 @@ describe('Test axes', function() { ]); }); + it('supports e/E format on log axes', function() { + ['e', 'E'].forEach(function(e) { + var textOut = mockCalc({ + type: 'log', + tickmode: 'linear', + exponentformat: e, + showexponent: 'all', + tick0: 0, + dtick: 'D2', + range: [-4.1, 4.1] + }); + + var oep = '1' + e + '+'; + var oem = '1' + e + '\u2212'; + + expect(textOut).toEqual([ + oem + '4', '2', '5', + oem + '3', '2', '5', + '0.01', '2', '5', + '0.1', '2', '5', + '1', '2', '5', + '10', '2', '5', + '100', '2', '5', + oep + '3', '2', '5', + oep + '4' + ]); + }); + }); + it('provides a new date suffix whenever the suffix changes', function() { var ax = { type: 'date', From 6c00814388307abef92236b0bb33573e4743d152 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Fri, 17 Aug 2018 16:42:45 -0400 Subject: [PATCH 2/4] fix bugs I introduced with my "cleanup" while adding log e/E format --- src/plots/cartesian/axes.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js index 2b7c02bf237..df122968484 100644 --- a/src/plots/cartesian/axes.js +++ b/src/plots/cartesian/axes.js @@ -1094,7 +1094,10 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) { hideexp = ''; } - if(extraPrecision && (dtChar0 !== 'L')) dtick = 'L3'; + if(extraPrecision && (dtChar0 !== 'L')) { + dtick = 'L3'; + dtChar0 = 'L'; + } if(tickformat || (dtChar0 === 'L')) { out.text = numFormat(Math.pow(10, x), ax, hideexp, extraPrecision); @@ -1106,7 +1109,7 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) { if(exponentFormat === 'power' || (isSIFormat(exponentFormat) && beyondSI(p))) { if(p === 0) out.text = 1; else if(p === 1) out.text = '10'; - out.text = '10' + (p > 1 ? '' : MINUS_SIGN) + absP + ''; + else out.text = '10' + (p > 1 ? '' : MINUS_SIGN) + absP + ''; out.fontSize *= 1.25; } From 58700c1d236219906a4599efe30be6c264ba0228 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Fri, 17 Aug 2018 16:43:17 -0400 Subject: [PATCH 3/4] update mocks 12 & 14 which used log e exponentformat when they wanted power --- test/image/mocks/12.json | 1488 ++++++++++++++++----------------- test/image/mocks/14.json | 716 ++++++++-------- test/image/mocks/gl2d_12.json | 2 +- test/image/mocks/gl2d_14.json | 4 +- 4 files changed, 1105 insertions(+), 1105 deletions(-) diff --git a/test/image/mocks/12.json b/test/image/mocks/12.json index cb394b568cf..a2773bbc05b 100644 --- a/test/image/mocks/12.json +++ b/test/image/mocks/12.json @@ -2,856 +2,856 @@ "data": [ { "x": [ - 6223.367465, - 4797.231267, - 1441.284873, - 12569.851770000001, - 1217.032994, - 430.07069160000003, - 2042.0952399999999, - 706.016537, - 1704.0637239999999, - 986.1478792000001, - 277.55185869999997, - 3632.557798, - 1544.750112, - 2082.4815670000003, - 5581.180998, - 12154.08975, - 641.3695236000001, - 690.8055759, - 13206.48452, - 752.7497265, - 1327.60891, - 942.6542111, - 579.2317429999999, - 1463.249282, - 1569.331442, - 414.5073415, - 12057.49928, - 1044.770126, - 759.3499101, - 1042.581557, - 1803.1514960000002, - 10956.99112, - 3820.17523, - 823.6856205, - 4811.060429, - 619.6768923999999, - 2013.9773050000001, - 7670.122558, - 863.0884639000001, - 1598.435089, - 1712.4721359999999, - 862.5407561000001, - 926.1410683, - 9269.657808, - 2602.394995, - 4513.480643, - 1107.482182, - 882.9699437999999, - 7092.923025, - 1056.3801210000001, - 1271.211593, + 6223.367465, + 4797.231267, + 1441.284873, + 12569.851770000001, + 1217.032994, + 430.07069160000003, + 2042.0952399999999, + 706.016537, + 1704.0637239999999, + 986.1478792000001, + 277.55185869999997, + 3632.557798, + 1544.750112, + 2082.4815670000003, + 5581.180998, + 12154.08975, + 641.3695236000001, + 690.8055759, + 13206.48452, + 752.7497265, + 1327.60891, + 942.6542111, + 579.2317429999999, + 1463.249282, + 1569.331442, + 414.5073415, + 12057.49928, + 1044.770126, + 759.3499101, + 1042.581557, + 1803.1514960000002, + 10956.99112, + 3820.17523, + 823.6856205, + 4811.060429, + 619.6768923999999, + 2013.9773050000001, + 7670.122558, + 863.0884639000001, + 1598.435089, + 1712.4721359999999, + 862.5407561000001, + 926.1410683, + 9269.657808, + 2602.394995, + 4513.480643, + 1107.482182, + 882.9699437999999, + 7092.923025, + 1056.3801210000001, + 1271.211593, 469.70929810000007 - ], + ], "y": [ - 72.301, - 42.731, - 56.728, - 50.728, - 52.295, - 49.58, - 50.43, - 44.74100000000001, - 50.651, - 65.152, - 46.461999999999996, - 55.321999999999996, - 48.328, - 54.791000000000004, - 71.33800000000001, - 51.57899999999999, - 58.04, - 52.946999999999996, - 56.735, - 59.448, - 60.022, - 56.007, - 46.388000000000005, - 54.11, - 42.592, - 45.678000000000004, - 73.952, - 59.443000000000005, - 48.303000000000004, - 54.467, - 64.164, - 72.801, - 71.164, - 42.082, - 52.906000000000006, - 56.867, - 46.858999999999995, - 76.442, - 46.242, - 65.528, - 63.062, - 42.568000000000005, - 48.159, - 49.339, - 58.556000000000004, - 39.613, - 52.516999999999996, - 58.42, - 73.923, - 51.542, - 42.38399999999999, + 72.301, + 42.731, + 56.728, + 50.728, + 52.295, + 49.58, + 50.43, + 44.74100000000001, + 50.651, + 65.152, + 46.461999999999996, + 55.321999999999996, + 48.328, + 54.791000000000004, + 71.33800000000001, + 51.57899999999999, + 58.04, + 52.946999999999996, + 56.735, + 59.448, + 60.022, + 56.007, + 46.388000000000005, + 54.11, + 42.592, + 45.678000000000004, + 73.952, + 59.443000000000005, + 48.303000000000004, + 54.467, + 64.164, + 72.801, + 71.164, + 42.082, + 52.906000000000006, + 56.867, + 46.858999999999995, + 76.442, + 46.242, + 65.528, + 63.062, + 42.568000000000005, + 48.159, + 49.339, + 58.556000000000004, + 39.613, + 52.516999999999996, + 58.42, + 73.923, + 51.542, + 42.38399999999999, 43.486999999999995 - ], - "mode": "markers", - "name": "Africa", + ], + "mode": "markers", + "name": "Africa", "text": [ - "Country: Algeria
Life Expectancy: 72.301
GDP per capita: 6223.367465
Population: 33333216.0
Year: 2007", - "Country: Angola
Life Expectancy: 42.731
GDP per capita: 4797.231267
Population: 12420476.0
Year: 2007", - "Country: Benin
Life Expectancy: 56.728
GDP per capita: 1441.284873
Population: 8078314.0
Year: 2007", - "Country: Botswana
Life Expectancy: 50.728
GDP per capita: 12569.85177
Population: 1639131.0
Year: 2007", - "Country: Burkina Faso
Life Expectancy: 52.295
GDP per capita: 1217.032994
Population: 14326203.0
Year: 2007", - "Country: Burundi
Life Expectancy: 49.58
GDP per capita: 430.0706916
Population: 8390505.0
Year: 2007", - "Country: Cameroon
Life Expectancy: 50.43
GDP per capita: 2042.09524
Population: 17696293.0
Year: 2007", - "Country: Central African Republic
Life Expectancy: 44.741
GDP per capita: 706.016537
Population: 4369038.0
Year: 2007", - "Country: Chad
Life Expectancy: 50.651
GDP per capita: 1704.063724
Population: 10238807.0
Year: 2007", - "Country: Comoros
Life Expectancy: 65.152
GDP per capita: 986.1478792
Population: 710960.0
Year: 2007", - "Country: Congo, Dem. Rep.
Life Expectancy: 46.462
GDP per capita: 277.5518587
Population: 64606759.0
Year: 2007", - "Country: Congo, Rep.
Life Expectancy: 55.322
GDP per capita: 3632.557798
Population: 3800610.0
Year: 2007", - "Country: Cote dIvoire
Life Expectancy: 48.328
GDP per capita: 1544.750112
Population: 18013409.0
Year: 2007", - "Country: Djibouti
Life Expectancy: 54.791
GDP per capita: 2082.481567
Population: 496374.0
Year: 2007", - "Country: Egypt
Life Expectancy: 71.338
GDP per capita: 5581.180998
Population: 80264543.0
Year: 2007", - "Country: Equatorial Guinea
Life Expectancy: 51.579
GDP per capita: 12154.08975
Population: 551201.0
Year: 2007", - "Country: Eritrea
Life Expectancy: 58.04
GDP per capita: 641.3695236
Population: 4906585.0
Year: 2007", - "Country: Ethiopia
Life Expectancy: 52.947
GDP per capita: 690.8055759
Population: 76511887.0
Year: 2007", - "Country: Gabon
Life Expectancy: 56.735
GDP per capita: 13206.48452
Population: 1454867.0
Year: 2007", - "Country: Gambia
Life Expectancy: 59.448
GDP per capita: 752.7497265
Population: 1688359.0
Year: 2007", - "Country: Ghana
Life Expectancy: 60.022
GDP per capita: 1327.60891
Population: 22873338.0
Year: 2007", - "Country: Guinea
Life Expectancy: 56.007
GDP per capita: 942.6542111
Population: 9947814.0
Year: 2007", - "Country: Guinea-Bissau
Life Expectancy: 46.388
GDP per capita: 579.231743
Population: 1472041.0
Year: 2007", - "Country: Kenya
Life Expectancy: 54.11
GDP per capita: 1463.249282
Population: 35610177.0
Year: 2007", - "Country: Lesotho
Life Expectancy: 42.592
GDP per capita: 1569.331442
Population: 2012649.0
Year: 2007", - "Country: Liberia
Life Expectancy: 45.678
GDP per capita: 414.5073415
Population: 3193942.0
Year: 2007", - "Country: Libya
Life Expectancy: 73.952
GDP per capita: 12057.49928
Population: 6036914.0
Year: 2007", - "Country: Madagascar
Life Expectancy: 59.443
GDP per capita: 1044.770126
Population: 19167654.0
Year: 2007", - "Country: Malawi
Life Expectancy: 48.303
GDP per capita: 759.3499101
Population: 13327079.0
Year: 2007", - "Country: Mali
Life Expectancy: 54.467
GDP per capita: 1042.581557
Population: 12031795.0
Year: 2007", - "Country: Mauritania
Life Expectancy: 64.164
GDP per capita: 1803.151496
Population: 3270065.0
Year: 2007", - "Country: Mauritius
Life Expectancy: 72.801
GDP per capita: 10956.99112
Population: 1250882.0
Year: 2007", - "Country: Morocco
Life Expectancy: 71.164
GDP per capita: 3820.17523
Population: 33757175.0
Year: 2007", - "Country: Mozambique
Life Expectancy: 42.082
GDP per capita: 823.6856205
Population: 19951656.0
Year: 2007", - "Country: Namibia
Life Expectancy: 52.906
GDP per capita: 4811.060429
Population: 2055080.0
Year: 2007", - "Country: Niger
Life Expectancy: 56.867
GDP per capita: 619.6768924
Population: 12894865.0
Year: 2007", - "Country: Nigeria
Life Expectancy: 46.859
GDP per capita: 2013.977305
Population: 135031164.0
Year: 2007", - "Country: Reunion
Life Expectancy: 76.442
GDP per capita: 7670.122558
Population: 798094.0
Year: 2007", - "Country: Rwanda
Life Expectancy: 46.242
GDP per capita: 863.0884639
Population: 8860588.0
Year: 2007", - "Country: Sao Tome and Principe
Life Expectancy: 65.528
GDP per capita: 1598.435089
Population: 199579.0
Year: 2007", - "Country: Senegal
Life Expectancy: 63.062
GDP per capita: 1712.472136
Population: 12267493.0
Year: 2007", - "Country: Sierra Leone
Life Expectancy: 42.568
GDP per capita: 862.5407561
Population: 6144562.0
Year: 2007", - "Country: Somalia
Life Expectancy: 48.159
GDP per capita: 926.1410683
Population: 9118773.0
Year: 2007", - "Country: South Africa
Life Expectancy: 49.339
GDP per capita: 9269.657808
Population: 43997828.0
Year: 2007", - "Country: Sudan
Life Expectancy: 58.556
GDP per capita: 2602.394995
Population: 42292929.0
Year: 2007", - "Country: Swaziland
Life Expectancy: 39.613
GDP per capita: 4513.480643
Population: 1133066.0
Year: 2007", - "Country: Tanzania
Life Expectancy: 52.517
GDP per capita: 1107.482182
Population: 38139640.0
Year: 2007", - "Country: Togo
Life Expectancy: 58.42
GDP per capita: 882.9699438
Population: 5701579.0
Year: 2007", - "Country: Tunisia
Life Expectancy: 73.923
GDP per capita: 7092.923025
Population: 10276158.0
Year: 2007", - "Country: Uganda
Life Expectancy: 51.542
GDP per capita: 1056.380121
Population: 29170398.0
Year: 2007", - "Country: Zambia
Life Expectancy: 42.384
GDP per capita: 1271.211593
Population: 11746035.0
Year: 2007", + "Country: Algeria
Life Expectancy: 72.301
GDP per capita: 6223.367465
Population: 33333216.0
Year: 2007", + "Country: Angola
Life Expectancy: 42.731
GDP per capita: 4797.231267
Population: 12420476.0
Year: 2007", + "Country: Benin
Life Expectancy: 56.728
GDP per capita: 1441.284873
Population: 8078314.0
Year: 2007", + "Country: Botswana
Life Expectancy: 50.728
GDP per capita: 12569.85177
Population: 1639131.0
Year: 2007", + "Country: Burkina Faso
Life Expectancy: 52.295
GDP per capita: 1217.032994
Population: 14326203.0
Year: 2007", + "Country: Burundi
Life Expectancy: 49.58
GDP per capita: 430.0706916
Population: 8390505.0
Year: 2007", + "Country: Cameroon
Life Expectancy: 50.43
GDP per capita: 2042.09524
Population: 17696293.0
Year: 2007", + "Country: Central African Republic
Life Expectancy: 44.741
GDP per capita: 706.016537
Population: 4369038.0
Year: 2007", + "Country: Chad
Life Expectancy: 50.651
GDP per capita: 1704.063724
Population: 10238807.0
Year: 2007", + "Country: Comoros
Life Expectancy: 65.152
GDP per capita: 986.1478792
Population: 710960.0
Year: 2007", + "Country: Congo, Dem. Rep.
Life Expectancy: 46.462
GDP per capita: 277.5518587
Population: 64606759.0
Year: 2007", + "Country: Congo, Rep.
Life Expectancy: 55.322
GDP per capita: 3632.557798
Population: 3800610.0
Year: 2007", + "Country: Cote dIvoire
Life Expectancy: 48.328
GDP per capita: 1544.750112
Population: 18013409.0
Year: 2007", + "Country: Djibouti
Life Expectancy: 54.791
GDP per capita: 2082.481567
Population: 496374.0
Year: 2007", + "Country: Egypt
Life Expectancy: 71.338
GDP per capita: 5581.180998
Population: 80264543.0
Year: 2007", + "Country: Equatorial Guinea
Life Expectancy: 51.579
GDP per capita: 12154.08975
Population: 551201.0
Year: 2007", + "Country: Eritrea
Life Expectancy: 58.04
GDP per capita: 641.3695236
Population: 4906585.0
Year: 2007", + "Country: Ethiopia
Life Expectancy: 52.947
GDP per capita: 690.8055759
Population: 76511887.0
Year: 2007", + "Country: Gabon
Life Expectancy: 56.735
GDP per capita: 13206.48452
Population: 1454867.0
Year: 2007", + "Country: Gambia
Life Expectancy: 59.448
GDP per capita: 752.7497265
Population: 1688359.0
Year: 2007", + "Country: Ghana
Life Expectancy: 60.022
GDP per capita: 1327.60891
Population: 22873338.0
Year: 2007", + "Country: Guinea
Life Expectancy: 56.007
GDP per capita: 942.6542111
Population: 9947814.0
Year: 2007", + "Country: Guinea-Bissau
Life Expectancy: 46.388
GDP per capita: 579.231743
Population: 1472041.0
Year: 2007", + "Country: Kenya
Life Expectancy: 54.11
GDP per capita: 1463.249282
Population: 35610177.0
Year: 2007", + "Country: Lesotho
Life Expectancy: 42.592
GDP per capita: 1569.331442
Population: 2012649.0
Year: 2007", + "Country: Liberia
Life Expectancy: 45.678
GDP per capita: 414.5073415
Population: 3193942.0
Year: 2007", + "Country: Libya
Life Expectancy: 73.952
GDP per capita: 12057.49928
Population: 6036914.0
Year: 2007", + "Country: Madagascar
Life Expectancy: 59.443
GDP per capita: 1044.770126
Population: 19167654.0
Year: 2007", + "Country: Malawi
Life Expectancy: 48.303
GDP per capita: 759.3499101
Population: 13327079.0
Year: 2007", + "Country: Mali
Life Expectancy: 54.467
GDP per capita: 1042.581557
Population: 12031795.0
Year: 2007", + "Country: Mauritania
Life Expectancy: 64.164
GDP per capita: 1803.151496
Population: 3270065.0
Year: 2007", + "Country: Mauritius
Life Expectancy: 72.801
GDP per capita: 10956.99112
Population: 1250882.0
Year: 2007", + "Country: Morocco
Life Expectancy: 71.164
GDP per capita: 3820.17523
Population: 33757175.0
Year: 2007", + "Country: Mozambique
Life Expectancy: 42.082
GDP per capita: 823.6856205
Population: 19951656.0
Year: 2007", + "Country: Namibia
Life Expectancy: 52.906
GDP per capita: 4811.060429
Population: 2055080.0
Year: 2007", + "Country: Niger
Life Expectancy: 56.867
GDP per capita: 619.6768924
Population: 12894865.0
Year: 2007", + "Country: Nigeria
Life Expectancy: 46.859
GDP per capita: 2013.977305
Population: 135031164.0
Year: 2007", + "Country: Reunion
Life Expectancy: 76.442
GDP per capita: 7670.122558
Population: 798094.0
Year: 2007", + "Country: Rwanda
Life Expectancy: 46.242
GDP per capita: 863.0884639
Population: 8860588.0
Year: 2007", + "Country: Sao Tome and Principe
Life Expectancy: 65.528
GDP per capita: 1598.435089
Population: 199579.0
Year: 2007", + "Country: Senegal
Life Expectancy: 63.062
GDP per capita: 1712.472136
Population: 12267493.0
Year: 2007", + "Country: Sierra Leone
Life Expectancy: 42.568
GDP per capita: 862.5407561
Population: 6144562.0
Year: 2007", + "Country: Somalia
Life Expectancy: 48.159
GDP per capita: 926.1410683
Population: 9118773.0
Year: 2007", + "Country: South Africa
Life Expectancy: 49.339
GDP per capita: 9269.657808
Population: 43997828.0
Year: 2007", + "Country: Sudan
Life Expectancy: 58.556
GDP per capita: 2602.394995
Population: 42292929.0
Year: 2007", + "Country: Swaziland
Life Expectancy: 39.613
GDP per capita: 4513.480643
Population: 1133066.0
Year: 2007", + "Country: Tanzania
Life Expectancy: 52.517
GDP per capita: 1107.482182
Population: 38139640.0
Year: 2007", + "Country: Togo
Life Expectancy: 58.42
GDP per capita: 882.9699438
Population: 5701579.0
Year: 2007", + "Country: Tunisia
Life Expectancy: 73.923
GDP per capita: 7092.923025
Population: 10276158.0
Year: 2007", + "Country: Uganda
Life Expectancy: 51.542
GDP per capita: 1056.380121
Population: 29170398.0
Year: 2007", + "Country: Zambia
Life Expectancy: 42.384
GDP per capita: 1271.211593
Population: 11746035.0
Year: 2007", "Country: Zimbabwe
Life Expectancy: 43.487
GDP per capita: 469.7092981
Population: 12311143.0
Year: 2007" - ], + ], "marker": { - "color": "rgb(255, 0, 0)", + "color": "rgb(255, 0, 0)", "size": [ - 29.810746602820924, - 18.197149567147044, - 14.675557544415877, - 6.610603004351287, - 19.543385335458176, - 14.956442130894114, - 21.72077890062975, - 10.792626698654045, - 16.52185943835442, - 4.353683242838546, - 41.50240100063496, - 10.066092062338873, - 21.91453196050797, - 3.6377994860079204, - 46.258986486204044, - 3.8334450569607683, - 11.437310410545528, - 45.16465542353964, - 6.227961099314154, - 6.709136738617642, - 24.694430700391482, - 16.285386604676816, - 6.264612285824508, - 30.812100863425822, - 7.325179403286266, - 9.227791164226492, - 12.68649752933601, - 22.60573984618565, - 18.849582296257626, - 17.910159625556144, - 9.337109185582111, - 5.774872714286052, - 29.999726284159046, - 23.063420581238734, - 7.40199199438875, - 18.54140518159347, - 60, - 4.612764339536968, - 15.369704446995708, - 2.3067029222366395, - 18.084735199216812, - 12.79910818701753, - 15.592022291528775, - 34.24915519732991, - 33.57902844158756, - 5.496191404660524, - 31.887651824471956, - 12.329112567064463, - 16.55196774082315, - 27.887232791984047, - 17.696194784090615, + 29.810746602820924, + 18.197149567147044, + 14.675557544415877, + 6.610603004351287, + 19.543385335458176, + 14.956442130894114, + 21.72077890062975, + 10.792626698654045, + 16.52185943835442, + 4.353683242838546, + 41.50240100063496, + 10.066092062338873, + 21.91453196050797, + 3.6377994860079204, + 46.258986486204044, + 3.8334450569607683, + 11.437310410545528, + 45.16465542353964, + 6.227961099314154, + 6.709136738617642, + 24.694430700391482, + 16.285386604676816, + 6.264612285824508, + 30.812100863425822, + 7.325179403286266, + 9.227791164226492, + 12.68649752933601, + 22.60573984618565, + 18.849582296257626, + 17.910159625556144, + 9.337109185582111, + 5.774872714286052, + 29.999726284159046, + 23.063420581238734, + 7.40199199438875, + 18.54140518159347, + 60, + 4.612764339536968, + 15.369704446995708, + 2.3067029222366395, + 18.084735199216812, + 12.79910818701753, + 15.592022291528775, + 34.24915519732991, + 33.57902844158756, + 5.496191404660524, + 31.887651824471956, + 12.329112567064463, + 16.55196774082315, + 27.887232791984047, + 17.696194784090615, 18.11688103909921 - ], + ], "line": { - "color": "rgb(255, 255, 255)", + "color": "rgb(255, 255, 255)", "width": 1 - }, + }, "opacity": 0.51 - }, - "opacity": 0.95, - "visible": true, + }, + "opacity": 0.95, + "visible": true, "type": "scatter" - }, + }, { "x": [ - 12779.379640000001, - 3822.1370840000004, - 9065.800825, - 36319.235010000004, - 13171.63885, - 7006.580419, - 9645.06142, - 8948.102923, - 6025.374752000001, - 6873.262326000001, - 5728.353514, - 5186.050003, - 1201.637154, - 3548.3308460000003, - 7320.880262000001, - 11977.57496, - 2749.320965, - 9809.185636, - 4172.838464, - 7408.905561, - 19328.70901, - 18008.50924, - 42951.65309, - 10611.46299, + 12779.379640000001, + 3822.1370840000004, + 9065.800825, + 36319.235010000004, + 13171.63885, + 7006.580419, + 9645.06142, + 8948.102923, + 6025.374752000001, + 6873.262326000001, + 5728.353514, + 5186.050003, + 1201.637154, + 3548.3308460000003, + 7320.880262000001, + 11977.57496, + 2749.320965, + 9809.185636, + 4172.838464, + 7408.905561, + 19328.70901, + 18008.50924, + 42951.65309, + 10611.46299, 11415.805690000001 - ], + ], "y": [ - 75.32, - 65.554, - 72.39, - 80.653, - 78.553, - 72.889, - 78.782, - 78.273, - 72.235, - 74.994, - 71.878, - 70.259, - 60.916000000000004, - 70.19800000000001, - 72.567, - 76.195, - 72.899, - 75.53699999999999, - 71.752, - 71.421, - 78.74600000000001, - 69.819, - 78.242, - 76.384, + 75.32, + 65.554, + 72.39, + 80.653, + 78.553, + 72.889, + 78.782, + 78.273, + 72.235, + 74.994, + 71.878, + 70.259, + 60.916000000000004, + 70.19800000000001, + 72.567, + 76.195, + 72.899, + 75.53699999999999, + 71.752, + 71.421, + 78.74600000000001, + 69.819, + 78.242, + 76.384, 73.747 - ], - "mode": "markers", - "name": "Americas", + ], + "mode": "markers", + "name": "Americas", "text": [ - "Country: Argentina
Life Expectancy: 75.32
GDP per capita: 12779.37964
Population: 40301927.0
Year: 2007", - "Country: Bolivia
Life Expectancy: 65.554
GDP per capita: 3822.137084
Population: 9119152.0
Year: 2007", - "Country: Brazil
Life Expectancy: 72.39
GDP per capita: 9065.800825
Population: 190010647.0
Year: 2007", - "Country: Canada
Life Expectancy: 80.653
GDP per capita: 36319.23501
Population: 33390141.0
Year: 2007", - "Country: Chile
Life Expectancy: 78.553
GDP per capita: 13171.63885
Population: 16284741.0
Year: 2007", - "Country: Colombia
Life Expectancy: 72.889
GDP per capita: 7006.580419
Population: 44227550.0
Year: 2007", - "Country: Costa Rica
Life Expectancy: 78.782
GDP per capita: 9645.06142
Population: 4133884.0
Year: 2007", - "Country: Cuba
Life Expectancy: 78.273
GDP per capita: 8948.102923
Population: 11416987.0
Year: 2007", - "Country: Dominican Republic
Life Expectancy: 72.235
GDP per capita: 6025.374752
Population: 9319622.0
Year: 2007", - "Country: Ecuador
Life Expectancy: 74.994
GDP per capita: 6873.262326
Population: 13755680.0
Year: 2007", - "Country: El Salvador
Life Expectancy: 71.878
GDP per capita: 5728.353514
Population: 6939688.0
Year: 2007", - "Country: Guatemala
Life Expectancy: 70.259
GDP per capita: 5186.050003
Population: 12572928.0
Year: 2007", - "Country: Haiti
Life Expectancy: 60.916
GDP per capita: 1201.637154
Population: 8502814.0
Year: 2007", - "Country: Honduras
Life Expectancy: 70.198
GDP per capita: 3548.330846
Population: 7483763.0
Year: 2007", - "Country: Jamaica
Life Expectancy: 72.567
GDP per capita: 7320.880262
Population: 2780132.0
Year: 2007", - "Country: Mexico
Life Expectancy: 76.195
GDP per capita: 11977.57496
Population: 108700891.0
Year: 2007", - "Country: Nicaragua
Life Expectancy: 72.899
GDP per capita: 2749.320965
Population: 5675356.0
Year: 2007", - "Country: Panama
Life Expectancy: 75.537
GDP per capita: 9809.185636
Population: 3242173.0
Year: 2007", - "Country: Paraguay
Life Expectancy: 71.752
GDP per capita: 4172.838464
Population: 6667147.0
Year: 2007", - "Country: Peru
Life Expectancy: 71.421
GDP per capita: 7408.905561
Population: 28674757.0
Year: 2007", - "Country: Puerto Rico
Life Expectancy: 78.746
GDP per capita: 19328.70901
Population: 3942491.0
Year: 2007", - "Country: Trinidad and Tobago
Life Expectancy: 69.819
GDP per capita: 18008.50924
Population: 1056608.0
Year: 2007", - "Country: United States
Life Expectancy: 78.242
GDP per capita: 42951.65309
Population: 301139947.0
Year: 2007", - "Country: Uruguay
Life Expectancy: 76.384
GDP per capita: 10611.46299
Population: 3447496.0
Year: 2007", + "Country: Argentina
Life Expectancy: 75.32
GDP per capita: 12779.37964
Population: 40301927.0
Year: 2007", + "Country: Bolivia
Life Expectancy: 65.554
GDP per capita: 3822.137084
Population: 9119152.0
Year: 2007", + "Country: Brazil
Life Expectancy: 72.39
GDP per capita: 9065.800825
Population: 190010647.0
Year: 2007", + "Country: Canada
Life Expectancy: 80.653
GDP per capita: 36319.23501
Population: 33390141.0
Year: 2007", + "Country: Chile
Life Expectancy: 78.553
GDP per capita: 13171.63885
Population: 16284741.0
Year: 2007", + "Country: Colombia
Life Expectancy: 72.889
GDP per capita: 7006.580419
Population: 44227550.0
Year: 2007", + "Country: Costa Rica
Life Expectancy: 78.782
GDP per capita: 9645.06142
Population: 4133884.0
Year: 2007", + "Country: Cuba
Life Expectancy: 78.273
GDP per capita: 8948.102923
Population: 11416987.0
Year: 2007", + "Country: Dominican Republic
Life Expectancy: 72.235
GDP per capita: 6025.374752
Population: 9319622.0
Year: 2007", + "Country: Ecuador
Life Expectancy: 74.994
GDP per capita: 6873.262326
Population: 13755680.0
Year: 2007", + "Country: El Salvador
Life Expectancy: 71.878
GDP per capita: 5728.353514
Population: 6939688.0
Year: 2007", + "Country: Guatemala
Life Expectancy: 70.259
GDP per capita: 5186.050003
Population: 12572928.0
Year: 2007", + "Country: Haiti
Life Expectancy: 60.916
GDP per capita: 1201.637154
Population: 8502814.0
Year: 2007", + "Country: Honduras
Life Expectancy: 70.198
GDP per capita: 3548.330846
Population: 7483763.0
Year: 2007", + "Country: Jamaica
Life Expectancy: 72.567
GDP per capita: 7320.880262
Population: 2780132.0
Year: 2007", + "Country: Mexico
Life Expectancy: 76.195
GDP per capita: 11977.57496
Population: 108700891.0
Year: 2007", + "Country: Nicaragua
Life Expectancy: 72.899
GDP per capita: 2749.320965
Population: 5675356.0
Year: 2007", + "Country: Panama
Life Expectancy: 75.537
GDP per capita: 9809.185636
Population: 3242173.0
Year: 2007", + "Country: Paraguay
Life Expectancy: 71.752
GDP per capita: 4172.838464
Population: 6667147.0
Year: 2007", + "Country: Peru
Life Expectancy: 71.421
GDP per capita: 7408.905561
Population: 28674757.0
Year: 2007", + "Country: Puerto Rico
Life Expectancy: 78.746
GDP per capita: 19328.70901
Population: 3942491.0
Year: 2007", + "Country: Trinidad and Tobago
Life Expectancy: 69.819
GDP per capita: 18008.50924
Population: 1056608.0
Year: 2007", + "Country: United States
Life Expectancy: 78.242
GDP per capita: 42951.65309
Population: 301139947.0
Year: 2007", + "Country: Uruguay
Life Expectancy: 76.384
GDP per capita: 10611.46299
Population: 3447496.0
Year: 2007", "Country: Venezuela
Life Expectancy: 73.747
GDP per capita: 11415.80569
Population: 26084662.0
Year: 2007" - ], + ], "marker": { - "color": "rgb(204, 204, 204)", + "color": "rgb(204, 204, 204)", "size": [ - 21.94976988499517, - 10.441052822396196, - 47.66021903725089, - 19.979112486875845, - 13.95267548575408, - 22.993945975228556, - 7.029852430522167, - 11.682689085146487, - 10.555193870118702, - 12.823544926991564, - 9.108293955789053, - 12.259853478972317, - 10.082039742103595, - 9.458604761285072, - 5.765006135966166, - 36.048202790993614, - 8.23689670992972, - 6.22565654446431, - 8.927648460491556, - 18.514711052673302, - 6.865187781408511, - 3.5540539239313094, - 60, - 6.41976234423909, + 21.94976988499517, + 10.441052822396196, + 47.66021903725089, + 19.979112486875845, + 13.95267548575408, + 22.993945975228556, + 7.029852430522167, + 11.682689085146487, + 10.555193870118702, + 12.823544926991564, + 9.108293955789053, + 12.259853478972317, + 10.082039742103595, + 9.458604761285072, + 5.765006135966166, + 36.048202790993614, + 8.23689670992972, + 6.22565654446431, + 8.927648460491556, + 18.514711052673302, + 6.865187781408511, + 3.5540539239313094, + 60, + 6.41976234423909, 17.658738378883186 - ], + ], "line": { - "color": "rgb(255, 255, 255)", + "color": "rgb(255, 255, 255)", "width": 1 - }, + }, "opacity": 0.51 - }, - "opacity": 0.95, - "visible": true, + }, + "opacity": 0.95, + "visible": true, "type": "scatter" - }, + }, { "x": [ - 974.5803384, - 29796.048339999998, - 1391.253792, - 1713.7786859999999, - 4959.1148539999995, - 39724.97867, - 2452.210407, - 3540.6515640000002, - 11605.71449, - 4471.061906, - 25523.2771, - 31656.06806, - 4519.461171, - 1593.06548, - 23348.139730000003, - 10461.05868, - 12451.6558, - 3095.7722710000003, - 944, - 1091.359778, - 22316.19287, - 2605.94758, - 3190.481016, - 21654.83194, - 47143.179639999995, - 3970.0954070000003, - 4184.548089, - 28718.27684, - 7458.3963269999995, - 2441.576404, - 3025.349798, + 974.5803384, + 29796.048339999998, + 1391.253792, + 1713.7786859999999, + 4959.1148539999995, + 39724.97867, + 2452.210407, + 3540.6515640000002, + 11605.71449, + 4471.061906, + 25523.2771, + 31656.06806, + 4519.461171, + 1593.06548, + 23348.139730000003, + 10461.05868, + 12451.6558, + 3095.7722710000003, + 944, + 1091.359778, + 22316.19287, + 2605.94758, + 3190.481016, + 21654.83194, + 47143.179639999995, + 3970.0954070000003, + 4184.548089, + 28718.27684, + 7458.3963269999995, + 2441.576404, + 3025.349798, 2280.769906 - ], + ], "y": [ - 43.828, - 75.635, - 64.062, - 59.723, - 72.961, - 82.208, - 64.69800000000001, - 70.65, - 70.964, - 59.545, - 80.745, - 82.603, - 72.535, - 67.297, - 78.623, - 71.993, - 74.241, - 66.803, - 62.068999999999996, - 63.785, - 75.64, - 65.483, - 71.688, - 72.777, - 79.972, - 72.396, - 74.143, - 78.4, - 70.616, - 74.249, - 73.422, + 43.828, + 75.635, + 64.062, + 59.723, + 72.961, + 82.208, + 64.69800000000001, + 70.65, + 70.964, + 59.545, + 80.745, + 82.603, + 72.535, + 67.297, + 78.623, + 71.993, + 74.241, + 66.803, + 62.068999999999996, + 63.785, + 75.64, + 65.483, + 71.688, + 72.777, + 79.972, + 72.396, + 74.143, + 78.4, + 70.616, + 74.249, + 73.422, 62.698 - ], - "mode": "markers", - "name": "Asia", + ], + "mode": "markers", + "name": "Asia", "text": [ - "Country: Afghanistan
Life Expectancy: 43.828
GDP per capita: 974.5803384
Population: 31889923.0
Year: 2007", - "Country: Bahrain
Life Expectancy: 75.635
GDP per capita: 29796.04834
Population: 708573.0
Year: 2007", - "Country: Bangladesh
Life Expectancy: 64.062
GDP per capita: 1391.253792
Population: 150448339.0
Year: 2007", - "Country: Cambodia
Life Expectancy: 59.723
GDP per capita: 1713.778686
Population: 14131858.0
Year: 2007", - "Country: China
Life Expectancy: 72.961
GDP per capita: 4959.114854
Population: 1318683096.0
Year: 2007", - "Country: Hong Kong, China
Life Expectancy: 82.208
GDP per capita: 39724.97867
Population: 6980412.0
Year: 2007", - "Country: India
Life Expectancy: 64.698
GDP per capita: 2452.210407
Population: 1110396331.0
Year: 2007", - "Country: Indonesia
Life Expectancy: 70.65
GDP per capita: 3540.651564
Population: 223547000.0
Year: 2007", - "Country: Iran
Life Expectancy: 70.964
GDP per capita: 11605.71449
Population: 69453570.0
Year: 2007", - "Country: Iraq
Life Expectancy: 59.545
GDP per capita: 4471.061906
Population: 27499638.0
Year: 2007", - "Country: Israel
Life Expectancy: 80.745
GDP per capita: 25523.2771
Population: 6426679.0
Year: 2007", - "Country: Japan
Life Expectancy: 82.603
GDP per capita: 31656.06806
Population: 127467972.0
Year: 2007", - "Country: Jordan
Life Expectancy: 72.535
GDP per capita: 4519.461171
Population: 6053193.0
Year: 2007", - "Country: Korea, Dem. Rep.
Life Expectancy: 67.297
GDP per capita: 1593.06548
Population: 23301725.0
Year: 2007", - "Country: Korea, Rep.
Life Expectancy: 78.623
GDP per capita: 23348.13973
Population: 49044790.0
Year: 2007", - "Country: Lebanon
Life Expectancy: 71.993
GDP per capita: 10461.05868
Population: 3921278.0
Year: 2007", - "Country: Malaysia
Life Expectancy: 74.241
GDP per capita: 12451.6558
Population: 24821286.0
Year: 2007", - "Country: Mongolia
Life Expectancy: 66.803
GDP per capita: 3095.772271
Population: 2874127.0
Year: 2007", - "Country: Myanmar
Life Expectancy: 62.069
GDP per capita: 944.0
Population: 47761980.0
Year: 2007", - "Country: Nepal
Life Expectancy: 63.785
GDP per capita: 1091.359778
Population: 28901790.0
Year: 2007", - "Country: Oman
Life Expectancy: 75.64
GDP per capita: 22316.19287
Population: 3204897.0
Year: 2007", - "Country: Pakistan
Life Expectancy: 65.483
GDP per capita: 2605.94758
Population: 169270617.0
Year: 2007", - "Country: Philippines
Life Expectancy: 71.688
GDP per capita: 3190.481016
Population: 91077287.0
Year: 2007", - "Country: Saudi Arabia
Life Expectancy: 72.777
GDP per capita: 21654.83194
Population: 27601038.0
Year: 2007", - "Country: Singapore
Life Expectancy: 79.972
GDP per capita: 47143.17964
Population: 4553009.0
Year: 2007", - "Country: Sri Lanka
Life Expectancy: 72.396
GDP per capita: 3970.095407
Population: 20378239.0
Year: 2007", - "Country: Syria
Life Expectancy: 74.143
GDP per capita: 4184.548089
Population: 19314747.0
Year: 2007", - "Country: Taiwan
Life Expectancy: 78.4
GDP per capita: 28718.27684
Population: 23174294.0
Year: 2007", - "Country: Thailand
Life Expectancy: 70.616
GDP per capita: 7458.396327
Population: 65068149.0
Year: 2007", - "Country: Vietnam
Life Expectancy: 74.249
GDP per capita: 2441.576404
Population: 85262356.0
Year: 2007", - "Country: West Bank and Gaza
Life Expectancy: 73.422
GDP per capita: 3025.349798
Population: 4018332.0
Year: 2007", + "Country: Afghanistan
Life Expectancy: 43.828
GDP per capita: 974.5803384
Population: 31889923.0
Year: 2007", + "Country: Bahrain
Life Expectancy: 75.635
GDP per capita: 29796.04834
Population: 708573.0
Year: 2007", + "Country: Bangladesh
Life Expectancy: 64.062
GDP per capita: 1391.253792
Population: 150448339.0
Year: 2007", + "Country: Cambodia
Life Expectancy: 59.723
GDP per capita: 1713.778686
Population: 14131858.0
Year: 2007", + "Country: China
Life Expectancy: 72.961
GDP per capita: 4959.114854
Population: 1318683096.0
Year: 2007", + "Country: Hong Kong, China
Life Expectancy: 82.208
GDP per capita: 39724.97867
Population: 6980412.0
Year: 2007", + "Country: India
Life Expectancy: 64.698
GDP per capita: 2452.210407
Population: 1110396331.0
Year: 2007", + "Country: Indonesia
Life Expectancy: 70.65
GDP per capita: 3540.651564
Population: 223547000.0
Year: 2007", + "Country: Iran
Life Expectancy: 70.964
GDP per capita: 11605.71449
Population: 69453570.0
Year: 2007", + "Country: Iraq
Life Expectancy: 59.545
GDP per capita: 4471.061906
Population: 27499638.0
Year: 2007", + "Country: Israel
Life Expectancy: 80.745
GDP per capita: 25523.2771
Population: 6426679.0
Year: 2007", + "Country: Japan
Life Expectancy: 82.603
GDP per capita: 31656.06806
Population: 127467972.0
Year: 2007", + "Country: Jordan
Life Expectancy: 72.535
GDP per capita: 4519.461171
Population: 6053193.0
Year: 2007", + "Country: Korea, Dem. Rep.
Life Expectancy: 67.297
GDP per capita: 1593.06548
Population: 23301725.0
Year: 2007", + "Country: Korea, Rep.
Life Expectancy: 78.623
GDP per capita: 23348.13973
Population: 49044790.0
Year: 2007", + "Country: Lebanon
Life Expectancy: 71.993
GDP per capita: 10461.05868
Population: 3921278.0
Year: 2007", + "Country: Malaysia
Life Expectancy: 74.241
GDP per capita: 12451.6558
Population: 24821286.0
Year: 2007", + "Country: Mongolia
Life Expectancy: 66.803
GDP per capita: 3095.772271
Population: 2874127.0
Year: 2007", + "Country: Myanmar
Life Expectancy: 62.069
GDP per capita: 944.0
Population: 47761980.0
Year: 2007", + "Country: Nepal
Life Expectancy: 63.785
GDP per capita: 1091.359778
Population: 28901790.0
Year: 2007", + "Country: Oman
Life Expectancy: 75.64
GDP per capita: 22316.19287
Population: 3204897.0
Year: 2007", + "Country: Pakistan
Life Expectancy: 65.483
GDP per capita: 2605.94758
Population: 169270617.0
Year: 2007", + "Country: Philippines
Life Expectancy: 71.688
GDP per capita: 3190.481016
Population: 91077287.0
Year: 2007", + "Country: Saudi Arabia
Life Expectancy: 72.777
GDP per capita: 21654.83194
Population: 27601038.0
Year: 2007", + "Country: Singapore
Life Expectancy: 79.972
GDP per capita: 47143.17964
Population: 4553009.0
Year: 2007", + "Country: Sri Lanka
Life Expectancy: 72.396
GDP per capita: 3970.095407
Population: 20378239.0
Year: 2007", + "Country: Syria
Life Expectancy: 74.143
GDP per capita: 4184.548089
Population: 19314747.0
Year: 2007", + "Country: Taiwan
Life Expectancy: 78.4
GDP per capita: 28718.27684
Population: 23174294.0
Year: 2007", + "Country: Thailand
Life Expectancy: 70.616
GDP per capita: 7458.396327
Population: 65068149.0
Year: 2007", + "Country: Vietnam
Life Expectancy: 74.249
GDP per capita: 2441.576404
Population: 85262356.0
Year: 2007", + "Country: West Bank and Gaza
Life Expectancy: 73.422
GDP per capita: 3025.349798
Population: 4018332.0
Year: 2007", "Country: Yemen, Rep.
Life Expectancy: 62.698
GDP per capita: 2280.769906
Population: 22211743.0
Year: 2007" - ], + ], "marker": { - "color": "rgb(204, 204, 204)", + "color": "rgb(204, 204, 204)", "size": [ - 9.330561207739747, - 1.390827697025556, - 20.266312242166443, - 6.211273648937339, - 60, - 4.3653750211924, - 55.05795036085951, - 24.703896200017994, - 13.769821732555231, - 8.664520214956125, - 4.188652530719761, - 18.654412200415056, - 4.0651192623762835, - 7.975814912067495, - 11.57117523159306, - 3.271861016562374, - 8.231768913808876, - 2.8011347940934943, - 11.418845373343052, - 8.882667412223675, - 2.9579312056937046, - 21.49670117903256, - 15.768343552577761, - 8.680479951148044, - 3.525577657243318, - 7.4587209016354095, - 7.261486641287726, - 7.95397619750268, - 13.3280083790662, - 15.256667990032932, - 3.312103798885452, + 9.330561207739747, + 1.390827697025556, + 20.266312242166443, + 6.211273648937339, + 60, + 4.3653750211924, + 55.05795036085951, + 24.703896200017994, + 13.769821732555231, + 8.664520214956125, + 4.188652530719761, + 18.654412200415056, + 4.0651192623762835, + 7.975814912067495, + 11.57117523159306, + 3.271861016562374, + 8.231768913808876, + 2.8011347940934943, + 11.418845373343052, + 8.882667412223675, + 2.9579312056937046, + 21.49670117903256, + 15.768343552577761, + 8.680479951148044, + 3.525577657243318, + 7.4587209016354095, + 7.261486641287726, + 7.95397619750268, + 13.3280083790662, + 15.256667990032932, + 3.312103798885452, 7.787039017632765 - ], + ], "line": { - "color": "rgb(255, 255, 255)", + "color": "rgb(255, 255, 255)", "width": 1 - }, + }, "opacity": 0.51 - }, - "opacity": 0.95, - "visible": true, + }, + "opacity": 0.95, + "visible": true, "type": "scatter" - }, + }, { "x": [ - 5937.029525999999, - 36126.4927, - 33692.60508, - 7446.298803, - 10680.79282, - 14619.222719999998, - 22833.30851, - 35278.41874, - 33207.0844, - 30470.0167, - 32170.37442, - 27538.41188, - 18008.94444, - 36180.789189999996, - 40675.99635, - 28569.7197, - 9253.896111, - 36797.93332, - 49357.19017, - 15389.924680000002, - 20509.64777, - 10808.47561, - 9786.534714, - 18678.31435, - 25768.25759, - 28821.0637, - 33859.74835, - 37506.419069999996, - 8458.276384, + 5937.029525999999, + 36126.4927, + 33692.60508, + 7446.298803, + 10680.79282, + 14619.222719999998, + 22833.30851, + 35278.41874, + 33207.0844, + 30470.0167, + 32170.37442, + 27538.41188, + 18008.94444, + 36180.789189999996, + 40675.99635, + 28569.7197, + 9253.896111, + 36797.93332, + 49357.19017, + 15389.924680000002, + 20509.64777, + 10808.47561, + 9786.534714, + 18678.31435, + 25768.25759, + 28821.0637, + 33859.74835, + 37506.419069999996, + 8458.276384, 33203.26128 - ], + ], "y": [ - 76.423, - 79.829, - 79.441, - 74.852, - 73.005, - 75.748, - 76.486, - 78.332, - 79.313, - 80.657, - 79.406, - 79.483, - 73.33800000000001, - 81.757, - 78.885, - 80.546, - 74.543, - 79.762, - 80.196, - 75.563, - 78.098, - 72.476, - 74.002, - 74.663, - 77.926, - 80.941, - 80.884, - 81.70100000000001, - 71.777, + 76.423, + 79.829, + 79.441, + 74.852, + 73.005, + 75.748, + 76.486, + 78.332, + 79.313, + 80.657, + 79.406, + 79.483, + 73.33800000000001, + 81.757, + 78.885, + 80.546, + 74.543, + 79.762, + 80.196, + 75.563, + 78.098, + 72.476, + 74.002, + 74.663, + 77.926, + 80.941, + 80.884, + 81.70100000000001, + 71.777, 79.425 - ], - "mode": "markers", - "name": "Europe", + ], + "mode": "markers", + "name": "Europe", "text": [ - "Country: Albania
Life Expectancy: 76.423
GDP per capita: 5937.029526
Population: 3600523.0
Year: 2007", - "Country: Austria
Life Expectancy: 79.829
GDP per capita: 36126.4927
Population: 8199783.0
Year: 2007", - "Country: Belgium
Life Expectancy: 79.441
GDP per capita: 33692.60508
Population: 10392226.0
Year: 2007", - "Country: Bosnia and Herzegovina
Life Expectancy: 74.852
GDP per capita: 7446.298803
Population: 4552198.0
Year: 2007", - "Country: Bulgaria
Life Expectancy: 73.005
GDP per capita: 10680.79282
Population: 7322858.0
Year: 2007", - "Country: Croatia
Life Expectancy: 75.748
GDP per capita: 14619.22272
Population: 4493312.0
Year: 2007", - "Country: Czech Republic
Life Expectancy: 76.486
GDP per capita: 22833.30851
Population: 10228744.0
Year: 2007", - "Country: Denmark
Life Expectancy: 78.332
GDP per capita: 35278.41874
Population: 5468120.0
Year: 2007", - "Country: Finland
Life Expectancy: 79.313
GDP per capita: 33207.0844
Population: 5238460.0
Year: 2007", - "Country: France
Life Expectancy: 80.657
GDP per capita: 30470.0167
Population: 61083916.0
Year: 2007", - "Country: Germany
Life Expectancy: 79.406
GDP per capita: 32170.37442
Population: 82400996.0
Year: 2007", - "Country: Greece
Life Expectancy: 79.483
GDP per capita: 27538.41188
Population: 10706290.0
Year: 2007", - "Country: Hungary
Life Expectancy: 73.338
GDP per capita: 18008.94444
Population: 9956108.0
Year: 2007", - "Country: Iceland
Life Expectancy: 81.757
GDP per capita: 36180.78919
Population: 301931.0
Year: 2007", - "Country: Ireland
Life Expectancy: 78.885
GDP per capita: 40675.99635
Population: 4109086.0
Year: 2007", - "Country: Italy
Life Expectancy: 80.546
GDP per capita: 28569.7197
Population: 58147733.0
Year: 2007", - "Country: Montenegro
Life Expectancy: 74.543
GDP per capita: 9253.896111
Population: 684736.0
Year: 2007", - "Country: Netherlands
Life Expectancy: 79.762
GDP per capita: 36797.93332
Population: 16570613.0
Year: 2007", - "Country: Norway
Life Expectancy: 80.196
GDP per capita: 49357.19017
Population: 4627926.0
Year: 2007", - "Country: Poland
Life Expectancy: 75.563
GDP per capita: 15389.92468
Population: 38518241.0
Year: 2007", - "Country: Portugal
Life Expectancy: 78.098
GDP per capita: 20509.64777
Population: 10642836.0
Year: 2007", - "Country: Romania
Life Expectancy: 72.476
GDP per capita: 10808.47561
Population: 22276056.0
Year: 2007", - "Country: Serbia
Life Expectancy: 74.002
GDP per capita: 9786.534714
Population: 10150265.0
Year: 2007", - "Country: Slovak Republic
Life Expectancy: 74.663
GDP per capita: 18678.31435
Population: 5447502.0
Year: 2007", - "Country: Slovenia
Life Expectancy: 77.926
GDP per capita: 25768.25759
Population: 2009245.0
Year: 2007", - "Country: Spain
Life Expectancy: 80.941
GDP per capita: 28821.0637
Population: 40448191.0
Year: 2007", - "Country: Sweden
Life Expectancy: 80.884
GDP per capita: 33859.74835
Population: 9031088.0
Year: 2007", - "Country: Switzerland
Life Expectancy: 81.701
GDP per capita: 37506.41907
Population: 7554661.0
Year: 2007", - "Country: Turkey
Life Expectancy: 71.777
GDP per capita: 8458.276384
Population: 71158647.0
Year: 2007", + "Country: Albania
Life Expectancy: 76.423
GDP per capita: 5937.029526
Population: 3600523.0
Year: 2007", + "Country: Austria
Life Expectancy: 79.829
GDP per capita: 36126.4927
Population: 8199783.0
Year: 2007", + "Country: Belgium
Life Expectancy: 79.441
GDP per capita: 33692.60508
Population: 10392226.0
Year: 2007", + "Country: Bosnia and Herzegovina
Life Expectancy: 74.852
GDP per capita: 7446.298803
Population: 4552198.0
Year: 2007", + "Country: Bulgaria
Life Expectancy: 73.005
GDP per capita: 10680.79282
Population: 7322858.0
Year: 2007", + "Country: Croatia
Life Expectancy: 75.748
GDP per capita: 14619.22272
Population: 4493312.0
Year: 2007", + "Country: Czech Republic
Life Expectancy: 76.486
GDP per capita: 22833.30851
Population: 10228744.0
Year: 2007", + "Country: Denmark
Life Expectancy: 78.332
GDP per capita: 35278.41874
Population: 5468120.0
Year: 2007", + "Country: Finland
Life Expectancy: 79.313
GDP per capita: 33207.0844
Population: 5238460.0
Year: 2007", + "Country: France
Life Expectancy: 80.657
GDP per capita: 30470.0167
Population: 61083916.0
Year: 2007", + "Country: Germany
Life Expectancy: 79.406
GDP per capita: 32170.37442
Population: 82400996.0
Year: 2007", + "Country: Greece
Life Expectancy: 79.483
GDP per capita: 27538.41188
Population: 10706290.0
Year: 2007", + "Country: Hungary
Life Expectancy: 73.338
GDP per capita: 18008.94444
Population: 9956108.0
Year: 2007", + "Country: Iceland
Life Expectancy: 81.757
GDP per capita: 36180.78919
Population: 301931.0
Year: 2007", + "Country: Ireland
Life Expectancy: 78.885
GDP per capita: 40675.99635
Population: 4109086.0
Year: 2007", + "Country: Italy
Life Expectancy: 80.546
GDP per capita: 28569.7197
Population: 58147733.0
Year: 2007", + "Country: Montenegro
Life Expectancy: 74.543
GDP per capita: 9253.896111
Population: 684736.0
Year: 2007", + "Country: Netherlands
Life Expectancy: 79.762
GDP per capita: 36797.93332
Population: 16570613.0
Year: 2007", + "Country: Norway
Life Expectancy: 80.196
GDP per capita: 49357.19017
Population: 4627926.0
Year: 2007", + "Country: Poland
Life Expectancy: 75.563
GDP per capita: 15389.92468
Population: 38518241.0
Year: 2007", + "Country: Portugal
Life Expectancy: 78.098
GDP per capita: 20509.64777
Population: 10642836.0
Year: 2007", + "Country: Romania
Life Expectancy: 72.476
GDP per capita: 10808.47561
Population: 22276056.0
Year: 2007", + "Country: Serbia
Life Expectancy: 74.002
GDP per capita: 9786.534714
Population: 10150265.0
Year: 2007", + "Country: Slovak Republic
Life Expectancy: 74.663
GDP per capita: 18678.31435
Population: 5447502.0
Year: 2007", + "Country: Slovenia
Life Expectancy: 77.926
GDP per capita: 25768.25759
Population: 2009245.0
Year: 2007", + "Country: Spain
Life Expectancy: 80.941
GDP per capita: 28821.0637
Population: 40448191.0
Year: 2007", + "Country: Sweden
Life Expectancy: 80.884
GDP per capita: 33859.74835
Population: 9031088.0
Year: 2007", + "Country: Switzerland
Life Expectancy: 81.701
GDP per capita: 37506.41907
Population: 7554661.0
Year: 2007", + "Country: Turkey
Life Expectancy: 71.777
GDP per capita: 8458.276384
Population: 71158647.0
Year: 2007", "Country: United Kingdom
Life Expectancy: 79.425
GDP per capita: 33203.26128
Population: 60776238.0
Year: 2007" - ], + ], "marker": { - "color": "rgb(204, 204, 204)", + "color": "rgb(204, 204, 204)", "size": [ - 12.542029402681376, - 18.92719251331642, - 21.30783431755826, - 14.102483219452576, - 17.88649832258261, - 14.010973368444008, - 21.139571238812916, - 15.456246600674588, - 15.128185315496781, - 51.65929267153148, - 60, - 21.627410389852702, - 20.855942428523296, - 3.6319417326760695, - 13.398544876923102, - 50.40242285907865, - 5.469487077232467, - 26.90632025621006, - 14.2193001873736, - 41.02213342839891, - 21.56322451638816, - 31.196377737918432, - 21.058319482558733, - 15.427079550618533, - 9.369177525034539, - 42.03727650225595, - 19.863467167731834, - 18.167388787784372, - 55.75693095494465, + 12.542029402681376, + 18.92719251331642, + 21.30783431755826, + 14.102483219452576, + 17.88649832258261, + 14.010973368444008, + 21.139571238812916, + 15.456246600674588, + 15.128185315496781, + 51.65929267153148, + 60, + 21.627410389852702, + 20.855942428523296, + 3.6319417326760695, + 13.398544876923102, + 50.40242285907865, + 5.469487077232467, + 26.90632025621006, + 14.2193001873736, + 41.02213342839891, + 21.56322451638816, + 31.196377737918432, + 21.058319482558733, + 15.427079550618533, + 9.369177525034539, + 42.03727650225595, + 19.863467167731834, + 18.167388787784372, + 55.75693095494465, 51.529025209914586 - ], + ], "line": { - "color": "rgb(255, 255, 255)", + "color": "rgb(255, 255, 255)", "width": 1 - }, + }, "opacity": 0.51 - }, - "opacity": 0.95, - "visible": true, + }, + "opacity": 0.95, + "visible": true, "type": "scatter" - }, + }, { "x": [ - 34435.367439999995, + 34435.367439999995, 25185.00911 - ], + ], "y": [ - 81.235, + 81.235, 80.204 - ], - "mode": "markers", - "name": "Oceania", + ], + "mode": "markers", + "name": "Oceania", "text": [ - "Country: Australia
Life Expectancy: 81.235
GDP per capita: 34435.36744
Population: 20434176.0
Year: 2007", + "Country: Australia
Life Expectancy: 81.235
GDP per capita: 34435.36744
Population: 20434176.0
Year: 2007", "Country: New Zealand
Life Expectancy: 80.204
GDP per capita: 25185.00911
Population: 4115771.0
Year: 2007" - ], + ], "marker": { - "color": "rgb(204, 204, 204)", + "color": "rgb(204, 204, 204)", "size": [ - 60, + 60, 26.92763965464884 - ], + ], "line": { - "color": "rgb(255, 255, 255)", + "color": "rgb(255, 255, 255)", "width": 1 - }, + }, "opacity": 0.51 - }, - "opacity": 0.95, - "visible": true, + }, + "opacity": 0.95, + "visible": true, "type": "scatter" } - ], + ], "layout": { - "title": "Life Expectancy vs GDP
Bubble Chart", + "title": "Life Expectancy vs GDP
Bubble Chart", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "font": { - "family": "'Open sans', verdana, arial, sans-serif", - "size": 12, + "family": "'Open sans', verdana, arial, sans-serif", + "size": 12, "color": "#000" - }, - "showlegend": false, - "autosize": false, - "width": 600, - "height": 496, + }, + "showlegend": false, + "autosize": false, + "width": 600, + "height": 496, "xaxis": { - "title": "GDP per capita (2000 dollars)", + "title": "GDP per capita (2000 dollars)", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "range": [ - 2.1277059579936974, + 2.1277059579936974, 5.024737566733606 - ], + ], "domain": [ - 0, + 0, 1 - ], - "type": "log", - "rangemode": "normal", - "showgrid": false, - "zeroline": false, - "showline": true, - "autotick": true, - "nticks": 0, - "ticks": "", - "showticklabels": true, - "tick0": 0, - "dtick": "D2", - "ticklen": 5, - "tickwidth": 1, - "tickcolor": "#000", - "tickangle": 0, + ], + "type": "log", + "rangemode": "normal", + "showgrid": false, + "zeroline": false, + "showline": true, + "autotick": true, + "nticks": 0, + "ticks": "", + "showticklabels": true, + "tick0": 0, + "dtick": "D2", + "ticklen": 5, + "tickwidth": 1, + "tickcolor": "#000", + "tickangle": 0, "tickfont": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "exponentformat": "e", - "showexponent": "all", - "gridcolor": "#ddd", - "gridwidth": 1, - "zerolinecolor": "#000", - "zerolinewidth": 1, - "linecolor": "white", - "linewidth": 1, - "anchor": "y", - "position": 0, - "mirror": "all", - "overlaying": false, + }, + "exponentformat": "power", + "showexponent": "all", + "gridcolor": "#ddd", + "gridwidth": 1, + "zerolinecolor": "#000", + "zerolinewidth": 1, + "linecolor": "white", + "linewidth": 1, + "anchor": "y", + "position": 0, + "mirror": "all", + "overlaying": false, "autorange": true - }, + }, "yaxis": { - "title": "Life Expectancy (years)", + "title": "Life Expectancy (years)", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "range": [ - 36.324623672665126, + 36.324623672665126, 90.34700250569831 - ], + ], "domain": [ - 0, + 0, 1 - ], - "type": "linear", - "rangemode": "normal", - "showgrid": false, - "zeroline": false, - "showline": true, - "autotick": true, - "nticks": 0, - "ticks": "", - "showticklabels": true, - "tick0": 0, - "dtick": 10, - "ticklen": 5, - "tickwidth": 1, - "tickcolor": "#000", - "tickangle": 0, + ], + "type": "linear", + "rangemode": "normal", + "showgrid": false, + "zeroline": false, + "showline": true, + "autotick": true, + "nticks": 0, + "ticks": "", + "showticklabels": true, + "tick0": 0, + "dtick": 10, + "ticklen": 5, + "tickwidth": 1, + "tickcolor": "#000", + "tickangle": 0, "tickfont": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "exponentformat": "e", - "showexponent": "all", - "gridcolor": "#ddd", - "gridwidth": 1, - "zerolinecolor": "#000", - "zerolinewidth": 1, - "linecolor": "white", - "linewidth": 1, - "anchor": "x", - "position": 0, - "mirror": "all", - "overlaying": false, + }, + "exponentformat": "e", + "showexponent": "all", + "gridcolor": "#ddd", + "gridwidth": 1, + "zerolinecolor": "#000", + "zerolinewidth": 1, + "linecolor": "white", + "linewidth": 1, + "anchor": "x", + "position": 0, + "mirror": "all", + "overlaying": false, "autorange": true - }, + }, "legend": { - "traceorder": "normal", + "traceorder": "normal", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "bgcolor": "#fff", - "bordercolor": "#000", + }, + "bgcolor": "#fff", + "bordercolor": "#000", "borderwidth": 1 - }, + }, "annotations": [ { - "x": 0.9750000000000001, - "y": 0.06952136075949367, - "xref": "paper", - "yref": "paper", - "text": "2007", + "x": 0.9750000000000001, + "y": 0.06952136075949367, + "xref": "paper", + "yref": "paper", + "text": "2007", "font": { - "family": "", - "size": 36, + "family": "", + "size": 36, "color": "rgb(23, 190, 207)" - }, - "align": "center", - "showarrow": false, - "arrowhead": 1, - "arrowsize": 1, - "arrowwidth": 0, - "arrowcolor": "", - "ax": -10, - "ay": -44.515625, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", + }, + "align": "center", + "showarrow": false, + "arrowhead": 1, + "arrowsize": 1, + "arrowwidth": 0, + "arrowcolor": "", + "ax": -10, + "ay": -44.515625, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", "tag": "" } - ], + ], "margin": { - "l": 80, - "r": 80, - "b": 80, - "t": 100, - "pad": 2, + "l": 80, + "r": 80, + "b": 80, + "t": 100, + "pad": 2, "autoexpand": true - }, - "paper_bgcolor": "#fff", - "plot_bgcolor": "#fff", - "hovermode": "closest", - "dragmode": "zoom", - "barmode": "stack", - "bargap": 0.2, - "bargroupgap": 0, - "boxmode": "overlay", - "separators": ".,", + }, + "paper_bgcolor": "#fff", + "plot_bgcolor": "#fff", + "hovermode": "closest", + "dragmode": "zoom", + "barmode": "stack", + "bargap": 0.2, + "bargroupgap": 0, + "boxmode": "overlay", + "separators": ".,", "hidesources": false } } diff --git a/test/image/mocks/14.json b/test/image/mocks/14.json index 84e03cd181c..159503ff462 100644 --- a/test/image/mocks/14.json +++ b/test/image/mocks/14.json @@ -2,432 +2,432 @@ "data": [ { "x": [ - 0.002, - 0.004, - 0.006, - 0.009, - 0.013, - 0.02, - 0.028, - 0.037, - 0.054, - 0.076, - 0.099, - 0.125, - 0.154, - 0.188, - 0.228, - 0.275, - 0.33, - 0.388, - 0.448, - 0.517, - 0.594, - 0.683, - 0.809, - 0.964, - 1.165, - 1.425, - 1.753, - 2.22, - 2.798, - 3.911, - 5.34, - 6.915, - 9.443, - 15.772, - 23.21, - 40.019, + 0.002, + 0.004, + 0.006, + 0.009, + 0.013, + 0.02, + 0.028, + 0.037, + 0.054, + 0.076, + 0.099, + 0.125, + 0.154, + 0.188, + 0.228, + 0.275, + 0.33, + 0.388, + 0.448, + 0.517, + 0.594, + 0.683, + 0.809, + 0.964, + 1.165, + 1.425, + 1.753, + 2.22, + 2.798, + 3.911, + 5.34, + 6.915, + 9.443, + 15.772, + 23.21, + 40.019, 69.684 - ], + ], "y": [ - 16.25, - 12.5, - 10, - 7.5, - 6.875, - 6.875, - 6.25, - 5.625, - 3.75, - 3.5, - 2.75, - 2.125, - 1.625, - 1.375, - 1.5, - 1.5, - 1.25, - 1, - 0.875, - 0.825, - 0.775, - 0.713, - 0.713, - 0.55, - 0.525, - 0.538, - 0.5, - 0.45, - 0.4, - 0.401, - 0.403, - 0.411, - 0.379, - 0.387, - 0.248, - 0.216, + 16.25, + 12.5, + 10, + 7.5, + 6.875, + 6.875, + 6.25, + 5.625, + 3.75, + 3.5, + 2.75, + 2.125, + 1.625, + 1.375, + 1.5, + 1.5, + 1.25, + 1, + 0.875, + 0.825, + 0.775, + 0.713, + 0.713, + 0.55, + 0.525, + 0.538, + 0.5, + 0.45, + 0.4, + 0.401, + 0.403, + 0.411, + 0.379, + 0.387, + 0.248, + 0.216, 0.154 - ], - "mode": "lines+markers", - "name": "PV learning curve.txt", + ], + "mode": "lines+markers", + "name": "PV learning curve.txt", "marker": { - "color": "rgb(0, 0, 238)", - "size": 12, + "color": "rgb(0, 0, 238)", + "size": 12, "line": { - "color": "rgb(0, 0, 238)", + "color": "rgb(0, 0, 238)", "width": 0 - }, + }, "opacity": 0.6 - }, + }, "line": { "color": "rgb(0, 0, 238)" - }, + }, "type": "scatter" } - ], + ], "layout": { - "title": "Silicon Photovoltaics Learning Curve", + "title": "Silicon Photovoltaics Learning Curve", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "font": { - "family": "Arial, sans-serif", - "size": 12, + "family": "Arial, sans-serif", + "size": 12, "color": "#000" - }, - "showlegend": false, - "autosize": false, - "width": 800, - "height": 440, + }, + "showlegend": false, + "autosize": false, + "width": 800, + "height": 440, "xaxis": { - "title": "Cumulative Production (GW)", + "title": "Cumulative Production (GW)", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "range": [ - -3.011967491973726, + -3.011967491973726, 2.1561305597186564 - ], + ], "domain": [ - 0, + 0, 1 - ], - "type": "log", - "rangemode": "normal", - "showgrid": true, - "zeroline": true, - "showline": false, - "autotick": true, - "nticks": 40, - "ticks": "", - "showticklabels": true, - "tick0": 0, - "dtick": "D1", - "ticklen": 5, - "tickwidth": 1, - "tickcolor": "#000", - "tickangle": 0, + ], + "type": "log", + "rangemode": "normal", + "showgrid": true, + "zeroline": true, + "showline": false, + "autotick": true, + "nticks": 40, + "ticks": "", + "showticklabels": true, + "tick0": 0, + "dtick": "D1", + "ticklen": 5, + "tickwidth": 1, + "tickcolor": "#000", + "tickangle": 0, "tickfont": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "exponentformat": "e", - "showexponent": "all", - "gridcolor": "#ddd", - "gridwidth": 1, - "zerolinecolor": "#000", - "zerolinewidth": 1, - "linecolor": "#000", - "linewidth": 1, - "anchor": "y", - "position": 0, - "mirror": true, - "overlaying": false, + }, + "exponentformat": "power", + "showexponent": "all", + "gridcolor": "#ddd", + "gridwidth": 1, + "zerolinecolor": "#000", + "zerolinewidth": 1, + "linecolor": "#000", + "linewidth": 1, + "anchor": "y", + "position": 0, + "mirror": true, + "overlaying": false, "autorange": true - }, + }, "yaxis": { - "title": "Cost ($/WP)", + "title": "Cost ($/WP)", "titlefont": { - "color": "", - "family": "", + "color": "", + "family": "", "size": 0 - }, + }, "range": [ - -0.9910086301469277, + -0.9910086301469277, 1.389382716298284 - ], + ], "domain": [ - 0, + 0, 1 - ], - "type": "log", - "rangemode": "normal", - "showgrid": true, - "zeroline": true, - "showline": false, - "autotick": true, - "nticks": 6, - "ticks": "", - "showticklabels": true, - "tick0": 0, - "dtick": "D2", - "ticklen": 5, - "tickwidth": 1, - "tickcolor": "#000", - "tickangle": 0, + ], + "type": "log", + "rangemode": "normal", + "showgrid": true, + "zeroline": true, + "showline": false, + "autotick": true, + "nticks": 6, + "ticks": "", + "showticklabels": true, + "tick0": 0, + "dtick": "D2", + "ticklen": 5, + "tickwidth": 1, + "tickcolor": "#000", + "tickangle": 0, "tickfont": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "exponentformat": "e", - "showexponent": "all", - "gridcolor": "#ddd", - "gridwidth": 1, - "zerolinecolor": "#000", - "zerolinewidth": 1, - "linecolor": "#000", - "linewidth": 1, - "anchor": "x", - "position": 0, - "mirror": true, - "overlaying": false, + }, + "exponentformat": "power", + "showexponent": "all", + "gridcolor": "#ddd", + "gridwidth": 1, + "zerolinecolor": "#000", + "zerolinewidth": 1, + "linecolor": "#000", + "linewidth": 1, + "anchor": "x", + "position": 0, + "mirror": true, + "overlaying": false, "autorange": true - }, + }, "legend": { - "x": 0.98, - "y": 0.98, - "traceorder": "normal", + "x": 0.98, + "y": 0.98, + "traceorder": "normal", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "bgcolor": "#fff", - "bordercolor": "#000", + }, + "bgcolor": "#fff", + "bordercolor": "#000", "borderwidth": 1 - }, + }, "annotations": [ { - "x": 1.197909148063702, - "y": -0.41792941349024315, - "xref": "x", - "yref": "y", - "text": "2008", + "x": 1.197909148063702, + "y": -0.41792941349024315, + "xref": "x", + "yref": "y", + "text": "2008", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": 19, - "ay": -27.500000476837158, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": 19, + "ay": -27.500000476837158, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" - }, + }, { - "x": 0.15585471975544452, - "y": -0.2712377967655569, - "xref": "x", - "yref": "y", - "text": "2000", + "x": 0.15585471975544452, + "y": -0.2712377967655569, + "xref": "x", + "yref": "y", + "text": "2000", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": 22, - "ay": -27.500000476837158, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": 22, + "ay": -27.500000476837158, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" - }, + }, { - "x": 1.8420351138192386, - "y": -0.812479279163537, - "xref": "x", - "yref": "y", - "text": "2011", + "x": 1.8420351138192386, + "y": -0.812479279163537, + "xref": "x", + "yref": "y", + "text": "2011", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": 12, - "ay": -28.500000476837158, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": 12, + "ay": -28.500000476837158, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" - }, + }, { - "x": -0.5537301200821234, - "y": 0.1728171433343787, - "xref": "x", - "yref": "y", - "text": "1990", + "x": -0.5537301200821234, + "y": 0.1728171433343787, + "xref": "x", + "yref": "y", + "text": "1990", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": 19, - "ay": -24.500000476837158, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": 19, + "ay": -24.500000476837158, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" - }, + }, { - "x": -2.701204903100102, - "y": 1.2106274048483296, - "xref": "x", - "yref": "y", - "text": "1975", + "x": -2.701204903100102, + "y": 1.2106274048483296, + "xref": "x", + "yref": "y", + "text": "1975", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": -6, - "ay": 29.499999523162842, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": -6, + "ay": 29.499999523162842, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" - }, + }, { - "x": -1.6961577824283882, - "y": 0.8389367615528911, - "xref": "x", - "yref": "y", - "text": "1980", + "x": -1.6961577824283882, + "y": 0.8389367615528911, + "xref": "x", + "yref": "y", + "text": "1980", "font": { - "family": "", - "size": 0, + "family": "", + "size": 0, "color": "" - }, - "align": "center", - "showarrow": true, - "arrowhead": 6, - "arrowsize": 1.5, - "arrowwidth": 0, - "arrowcolor": "rgb(102, 102, 102)", - "ax": 23, - "ay": -36.50000047683716, - "bordercolor": "", - "borderwidth": 1, - "borderpad": 1, - "bgcolor": "rgba(0,0,0,0)", - "opacity": 1, - "xanchor": "auto", - "yanchor": "auto", - "xatype": "log", - "yatype": "log", - "tag": "", + }, + "align": "center", + "showarrow": true, + "arrowhead": 6, + "arrowsize": 1.5, + "arrowwidth": 0, + "arrowcolor": "rgb(102, 102, 102)", + "ax": 23, + "ay": -36.50000047683716, + "bordercolor": "", + "borderwidth": 1, + "borderpad": 1, + "bgcolor": "rgba(0,0,0,0)", + "opacity": 1, + "xanchor": "auto", + "yanchor": "auto", + "xatype": "log", + "yatype": "log", + "tag": "", "ref": "plot" } - ], + ], "margin": { - "l": 50, - "r": 40, - "b": 60, - "t": 80, - "pad": 2, + "l": 50, + "r": 40, + "b": 60, + "t": 80, + "pad": 2, "autoexpand": true - }, - "paper_bgcolor": "#fff", - "plot_bgcolor": "#fff", - "hovermode": "x", - "dragmode": "zoom", - "barmode": "stack", - "bargap": 0.2, - "bargroupgap": 0, - "boxmode": "overlay", - "separators": ".,", + }, + "paper_bgcolor": "#fff", + "plot_bgcolor": "#fff", + "hovermode": "x", + "dragmode": "zoom", + "barmode": "stack", + "bargap": 0.2, + "bargroupgap": 0, + "boxmode": "overlay", + "separators": ".,", "hidesources": false } } diff --git a/test/image/mocks/gl2d_12.json b/test/image/mocks/gl2d_12.json index 1dd1a744dad..3784c3fd6da 100644 --- a/test/image/mocks/gl2d_12.json +++ b/test/image/mocks/gl2d_12.json @@ -734,7 +734,7 @@ "size": 0, "color": "" }, - "exponentformat": "e", + "exponentformat": "power", "showexponent": "all", "gridcolor": "#ddd", "gridwidth": 1, diff --git a/test/image/mocks/gl2d_14.json b/test/image/mocks/gl2d_14.json index ae5ab54a277..ba55cafb9a2 100644 --- a/test/image/mocks/gl2d_14.json +++ b/test/image/mocks/gl2d_14.json @@ -147,7 +147,7 @@ "size": 0, "color": "" }, - "exponentformat": "e", + "exponentformat": "power", "showexponent": "all", "gridcolor": "#ddd", "gridwidth": 1, @@ -196,7 +196,7 @@ "size": 0, "color": "" }, - "exponentformat": "e", + "exponentformat": "power", "showexponent": "all", "gridcolor": "#ddd", "gridwidth": 1, From 488bcf4299f0e2201ee251fa9b4de34c9eb86070 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Fri, 17 Aug 2018 17:09:10 -0400 Subject: [PATCH 4/4] fix a test that depended on mock 14 --- test/jasmine/tests/hover_label_test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js index af16777fbba..7dc0edf0feb 100644 --- a/test/jasmine/tests/hover_label_test.js +++ b/test/jasmine/tests/hover_label_test.js @@ -243,6 +243,9 @@ describe('hover info', function() { var mockCopy = Lib.extendDeep({}, mock); mockCopy.data[0].hoverinfo = 'y'; + // we do support superscripts in hover, but it's annoying to write + // out all the tspan stuff here. + mockCopy.layout.yaxis.exponentformat = 'e'; beforeEach(function(done) { for(var i = 0; i < mockCopy.data[0].y.length; i++) {