Skip to content

Instantly share code, notes, and snippets.

@quaquel
Created May 9, 2014 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quaquel/d2c223991128ff243a91 to your computer and use it in GitHub Desktop.
Save quaquel/d2c223991128ff243a91 to your computer and use it in GitHub Desktop.
{
"metadata": {
"name": "",
"signature": "sha256:d55393ad6b116163cb6f886b8cc5df1af60328cbaba11dfc281effeb86149b7e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import mpld3\n",
"from mpld3 import plugins, utils\n",
"\n",
"\n",
"class HighlightLines(plugins.PluginBase):\n",
" \"\"\"A plugin for an interactive legend. \n",
" \n",
" Inspired by http://bl.ocks.org/simzou/6439398\n",
" \n",
" \"\"\"\n",
"\n",
" JAVASCRIPT = \"\"\"\n",
" mpld3.register_plugin(\"interactive_legend\", InteractiveLegend);\n",
" InteractiveLegend.prototype = Object.create(mpld3.Plugin.prototype);\n",
" InteractiveLegend.prototype.constructor = InteractiveLegend;\n",
" InteractiveLegend.prototype.requiredProps = [\"line_ids\", \"labels\"];\n",
" InteractiveLegend.prototype.defaultProps = {}\n",
" function InteractiveLegend(fig, props){\n",
" mpld3.Plugin.call(this, fig, props);\n",
" };\n",
"\n",
" InteractiveLegend.prototype.draw = function(){\n",
" var labels = new Array();\n",
" for(var i=0; i<this.props.labels.length; i++){\n",
" var obj = {}\n",
" obj.label = this.props.labels[i]\n",
" obj.line = mpld3.get_element(this.props.line_ids[i], this.fig)\n",
" obj.visible = false;\n",
" labels.push(obj);\n",
" }\n",
" \n",
" var ax = this.fig.axes[0]\n",
" var legend = this.fig.canvas.append(\"svg:g\")\n",
" .attr(\"class\", \"legend\");\n",
" \n",
" // add the rectangles\n",
" legend.selectAll(\"rect\")\n",
" .data(labels)\n",
" .enter().append(\"rect\")\n",
" .attr(\"height\",10)\n",
" .attr(\"width\", 25)\n",
" .attr(\"x\",ax.width+10+ax.position[0])\n",
" .attr(\"y\",function(d,i) {\n",
" return ax.position[1]+ i * 25 - 10;})\n",
" .attr(\"stroke\", function(d) {\n",
" return d.line.props.edgecolor})\n",
" .attr(\"class\", \"legend-box\")\n",
" .style(\"fill\", \"white\")\n",
" .on(\"click\", click)\n",
" \n",
" // add the text\n",
" legend.selectAll(\"text\")\n",
" .data(labels)\n",
" .enter().append(\"text\")\n",
" .attr(\"x\", function (d) {\n",
" return ax.width+10+ax.position[0] + 25 + 15\n",
" })\n",
" .attr(\"y\", function(d,i) { \n",
" return ax.position[1]+ i * 25\n",
" })\n",
" .text(function(d) { return d.label })\n",
" \n",
" // specify the action on click\n",
" function click(d,i){\n",
" d.visible = !d.visible;\n",
" d3.select(this)\n",
" .style(\"fill\",function(d, i) {\n",
" console.log(d)\n",
" var color = d.line.props.edgecolor\n",
" return d.visible ? color : \"white\";\n",
" })\n",
" d3.select(d.line.path[0][0])\n",
" .style(\"stroke-opacity\", d.visible ? 1 : d.line.props.alpha);\n",
" \n",
" }\n",
" };\n",
" \"\"\"\n",
"\n",
" def __init__(self, lines, labels, css):\n",
" \n",
" self.css_ = css or \"\"\n",
" \n",
" self.lines = lines\n",
" self.dict_ = {\"type\": \"interactive_legend\",\n",
" \"line_ids\": [utils.get_id(line) for line in lines],\n",
" \"labels\":labels}\n",
"\n",
"\n",
"css = \"\"\"\n",
".legend-box {\n",
" cursor: pointer; \n",
"}\n",
"\"\"\"\n",
" \n",
"N_paths = 5\n",
"N_steps = 100\n",
"\n",
"x = np.linspace(0, 10, 100)\n",
"y = 0.1 * (np.random.random((N_paths, N_steps)) - 0.5)\n",
"y = y.cumsum(1)\n",
"\n",
"fig, ax = plt.subplots()\n",
"labels = [\"a\", \"b\", \"c\", \"d\", \"e\"]\n",
"lines = ax.plot(x, y.T, lw=4, alpha=0, label=labels)\n",
"plugins.connect(fig, HighlightLines(lines, labels, css))\n",
"\n",
"mpld3.display()\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"\n",
"\n",
"<style>\n",
"\n",
".legend-box {\n",
" cursor: pointer; \n",
"}\n",
"\n",
"</style>\n",
"\n",
"<div id=\"fig_el50245608749607465326996\"></div>\n",
"<script>\n",
"function mpld3_load_lib(url, callback){\n",
" var s = document.createElement('script');\n",
" s.src = url;\n",
" s.async = true;\n",
" s.onreadystatechange = s.onload = callback;\n",
" s.onerror = function(){console.warn(\"failed to load library \" + url);};\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
"}\n",
"\n",
"if(typeof(mpld3) !== \"undefined\" && mpld3._mpld3IsLoaded){\n",
" // already loaded: just create the figure\n",
" !function(mpld3){\n",
" \n",
" mpld3.register_plugin(\"interactive_legend\", InteractiveLegend);\n",
" InteractiveLegend.prototype = Object.create(mpld3.Plugin.prototype);\n",
" InteractiveLegend.prototype.constructor = InteractiveLegend;\n",
" InteractiveLegend.prototype.requiredProps = [\"line_ids\", \"labels\"];\n",
" InteractiveLegend.prototype.defaultProps = {}\n",
" function InteractiveLegend(fig, props){\n",
" mpld3.Plugin.call(this, fig, props);\n",
" };\n",
"\n",
" InteractiveLegend.prototype.draw = function(){\n",
" var labels = new Array();\n",
" for(var i=0; i<this.props.labels.length; i++){\n",
" var obj = {}\n",
" obj.label = this.props.labels[i]\n",
" obj.line = mpld3.get_element(this.props.line_ids[i], this.fig)\n",
" obj.visible = false;\n",
" labels.push(obj);\n",
" }\n",
" \n",
" var ax = this.fig.axes[0]\n",
" var legend = this.fig.canvas.append(\"svg:g\")\n",
" .attr(\"class\", \"legend\");\n",
" \n",
" // add the rectangles\n",
" legend.selectAll(\"rect\")\n",
" .data(labels)\n",
" .enter().append(\"rect\")\n",
" .attr(\"height\",10)\n",
" .attr(\"width\", 25)\n",
" .attr(\"x\",ax.width+10+ax.position[0])\n",
" .attr(\"y\",function(d,i) {\n",
" return ax.position[1]+ i * 25 - 10;})\n",
" .attr(\"stroke\", function(d) {\n",
" return d.line.props.edgecolor})\n",
" .attr(\"class\", \"legend-box\")\n",
" .style(\"fill\", \"white\")\n",
" .on(\"click\", click)\n",
" \n",
" // add the text\n",
" legend.selectAll(\"text\")\n",
" .data(labels)\n",
" .enter().append(\"text\")\n",
" .attr(\"x\", function (d) {\n",
" return ax.width+10+ax.position[0] + 25 + 15\n",
" })\n",
" .attr(\"y\", function(d,i) { \n",
" return ax.position[1]+ i * 25\n",
" })\n",
" .text(function(d) { return d.label })\n",
" \n",
" // specify the action on click\n",
" function click(d,i){\n",
" d.visible = !d.visible;\n",
" d3.select(this)\n",
" .style(\"fill\",function(d, i) {\n",
" console.log(d)\n",
" var color = d.line.props.edgecolor\n",
" return d.visible ? color : \"white\";\n",
" })\n",
" d3.select(d.line.path[0][0])\n",
" .style(\"stroke-opacity\", d.visible ? 1 : d.line.props.alpha);\n",
" \n",
" }\n",
" };\n",
" \n",
" mpld3.draw_figure(\"fig_el50245608749607465326996\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.19999999999999996], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 6, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563703184\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563803856\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878288\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878800\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563879312\"}], \"markers\": [], \"id\": \"el5024553698064\", \"ydomain\": [-0.60000000000000009, 0.19999999999999996], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.125, 0.77500000000000002, 0.77500000000000002]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"line_ids\": [\"el5024563703184\", \"el5024563803856\", \"el5024563878288\", \"el5024563878800\", \"el5024563879312\"], \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"type\": \"interactive_legend\"}], \"data\": {\"data01\": [[0.0, 0.0006651280693574457, -0.02691429854739549, -0.015357782842745216, -0.018118559853887252, 0.04806855716432506], [0.10101010101010101, -0.015180943238921085, -0.02723868310076905, 0.02949580636815275, -0.042710509835411296, 0.006540503919339601], [0.20202020202020202, -0.038100079491694416, -0.05365840692290541, 0.014970293964631426, 0.005552839038977082, -0.03141369674358736], [0.30303030303030304, -0.006029057389416455, -0.06305033228209696, 0.015470619014278425, -0.015440747291971951, -0.061468267198859214], [0.40404040404040403, -0.013001990162756757, -0.019716233657251246, 0.0284212724388109, -0.03240659665187046, -0.04417334831919084], [0.5050505050505051, -0.027509705421151998, 0.01773833563260946, -0.005766907031226141, -0.05885281265200493, -0.0663179215224472], [0.6060606060606061, -0.049844142070553654, -0.022566275892556165, -0.009222910276668626, -0.09855602658277252, -0.10581997629077601], [0.7070707070707071, -0.020364580044919055, -0.0645638087618266, -0.02796426781058786, -0.08081223410729352, -0.13876672018213296], [0.8080808080808081, 0.0013124883163326204, -0.03551386536032641, -0.03736391836936499, -0.05278295085387612, -0.171150686472464], [0.9090909090909091, -0.02006473629330968, -0.07358192404139807, -0.028717545262501722, -0.06254821022635307, -0.194366521896543], [1.0101010101010102, -0.03393397252640795, -0.08377121367440692, -0.06503713307461421, -0.046329676643637116, -0.18274591820008293], [1.1111111111111112, -0.03167372423953109, -0.08256138010605313, -0.11497065361108104, -0.017871412552172602, -0.23263557567911047], [1.2121212121212122, -0.005587627084298632, -0.08438293331608634, -0.10979940878709572, -0.025806112077680153, -0.25298834969602746], [1.3131313131313131, -0.01535841327282669, -0.09136912214005333, -0.1562677010856286, -0.006342369491538789, -0.23173372750924964], [1.4141414141414141, -0.044209779303758794, -0.06012267464848785, -0.15290790748194008, -0.019189048297410735, -0.2254862884935831], [1.5151515151515151, -0.04876010429563478, -0.044661950917831934, -0.18159847790430497, -0.04751244296320979, -0.2257314578040844], [1.6161616161616161, -0.011378901245018683, -0.012165761817389917, -0.15337595427626827, -0.009929612846032408, -0.18372943345690373], [1.7171717171717171, -0.01887621305071801, -0.028063853740882338, -0.18502807648763886, -0.03517530555062735, -0.2178873390767503], [1.8181818181818181, -0.04823008593238849, -0.046165376733057165, -0.2102782037398032, -0.002111959227330991, -0.1965810018601539], [1.9191919191919191, -0.043072586103440474, -0.07489341375642035, -0.20849148609378823, -0.00020860203029152277, -0.20133292090649602], [2.0202020202020203, -0.06205181143857365, -0.12192479027575209, -0.19818386421279602, -0.04991840731979827, -0.1999870611335541], [2.121212121212121, -0.05006189335250227, -0.08805882560916076, -0.1792809589129528, -0.0723784729200744, -0.19099492637314425], [2.2222222222222223, -0.02470013583479174, -0.10360868724949344, -0.1644512492979869, -0.09873293754843532, -0.1684415281703315], [2.323232323232323, -0.01004627661422817, -0.0958113124350431, -0.1505815649453592, -0.058984248033256886, -0.20436186831148262], [2.4242424242424243, 0.01592052608247424, -0.05440258884660488, -0.19585786357116855, -0.0953166151434912, -0.1650762005437762], [2.525252525252525, -0.012590599080221112, -0.07294291054174874, -0.20779291787330031, -0.07816603930710828, -0.14929827876613247], [2.6262626262626263, 0.02599833770188018, -0.03553002650017657, -0.257201008112498, -0.09760423614197716, -0.15557935133770484], [2.727272727272727, 0.0004934356658609258, 0.00713285287987564, -0.24601356731879867, -0.12437801599897988, -0.1299444507396649], [2.8282828282828283, 0.03754869961248147, 0.05636313120266595, -0.2801576127716724, -0.16760021820330334, -0.17445548426655078], [2.929292929292929, 0.025710242941354666, 0.07605959642500308, -0.29988763828399384, -0.21203251255826192, -0.19020193685751247], [3.0303030303030303, 0.004416688468096706, 0.02960187692095831, -0.30580224727131167, -0.2553909028337399, -0.1589597290097198], [3.131313131313131, -0.015863457508693928, 0.010524605304644233, -0.2853418443587777, -0.30226509792535305, -0.1321826155102086], [3.2323232323232323, -0.02149902629361818, 0.01963047450185951, -0.24351538979976312, -0.31933177914879596, -0.14719093408734152], [3.3333333333333335, -0.059592099930994694, -0.00940365221723035, -0.22193551771302297, -0.3251198047895543, -0.10155520732114545], [3.4343434343434343, -0.06790386576143723, -0.050122954454927794, -0.2044823989756481, -0.37327933457086204, -0.1227256319968058], [3.5353535353535355, -0.10033458289237895, -0.06486952000465349, -0.16626729702636547, -0.36294240605401423, -0.11354929003987778], [3.6363636363636362, -0.10977830261052962, -0.07059110594017644, -0.18142149521376819, -0.3960993461915271, -0.11663720092658984], [3.7373737373737375, -0.11903807271270486, -0.045904656420232184, -0.21373712543801485, -0.44146054789613887, -0.14828132227947372], [3.8383838383838382, -0.11170395788283538, -0.007138183357274085, -0.22848082889416496, -0.45476693681715896, -0.1342319735348], [3.9393939393939394, -0.06268045065957126, 0.0019375525039735404, -0.23345264344968933, -0.45892951468775656, -0.14814890908031897], [4.040404040404041, -0.08517440420764788, 0.04141204733845055, -0.2258325623615909, -0.4497446918351429, -0.1385152783140812], [4.141414141414141, -0.0794694809698281, 0.07704911888982452, -0.18970622074137583, -0.42302173267131427, -0.1065239820747619], [4.242424242424242, -0.09004261746248687, 0.06575693459089713, -0.236827933108535, -0.4395609150107741, -0.13345993551001734], [4.343434343434343, -0.07846928904340027, 0.04656502823089041, -0.21838559696761556, -0.4521825792579512, -0.18268910006422226], [4.444444444444445, -0.09203264111779338, 0.02176287012878336, -0.25639763226320406, -0.4822478027123101, -0.19554895010228704], [4.545454545454545, -0.06122898890269113, 0.03661537554850303, -0.2512325870289916, -0.43810147279455525, -0.19516569703064027], [4.646464646464646, -0.07258966707212802, 0.08157510066640455, -0.28256236832762516, -0.4251764992853453, -0.18862569520482084], [4.747474747474747, -0.09775430594386891, 0.12031081228330975, -0.27926829424828153, -0.42210125166367884, -0.21199574745654992], [4.848484848484849, -0.06492433156855924, 0.07282313963990666, -0.2964954555704868, -0.4080891885165106, -0.1861747061899108], [4.94949494949495, -0.10565223323033937, 0.07991604980599501, -0.3232400080010069, -0.39237106815181017, -0.155230013514082], [5.05050505050505, -0.12772626774781398, 0.09205288297471526, -0.2859923822273627, -0.39615166168591354, -0.13261689183413505], [5.151515151515151, -0.1416436032306556, 0.07682439397927168, -0.2690071173158092, -0.3711271119619567, -0.1707596158675162], [5.252525252525253, -0.17391161973448682, 0.060424018547744776, -0.2222370784688833, -0.4175128017487232, -0.15465074347754637], [5.353535353535354, -0.15475547368850817, 0.079811315680108, -0.24841897529284473, -0.3878385608148108, -0.12662530706261688], [5.454545454545454, -0.2044184007746567, 0.09965287918102145, -0.2909604635284064, -0.3750930938358069, -0.08953945758536101], [5.555555555555555, -0.18234430271958907, 0.05976113976406608, -0.3223327588211213, -0.36941921721576537, -0.1309871911591653], [5.656565656565657, -0.22376038895799008, 0.022369144773287226, -0.3564216121296211, -0.3946537777528778, -0.1803463783770605], [5.757575757575758, -0.25523156214543, 0.040093200795772915, -0.333969557667297, -0.4228899805972698, -0.13068252886420734], [5.858585858585858, -0.3028450902058368, -0.004393272496235376, -0.3174653157865831, -0.42583857129026065, -0.15223874308459498], [5.959595959595959, -0.3094786137662415, 0.020086230066749648, -0.3195177049380128, -0.38882928460551597, -0.17968879147411126], [6.0606060606060606, -0.2830023730097908, -0.0001701342198213926, -0.2771346763129652, -0.4338847380935227, -0.19329486288288358], [6.161616161616162, -0.25987845049349834, 0.027834735797977274, -0.24475009557376948, -0.47972464023888234, -0.17011725956065707], [6.262626262626262, -0.2679729806744808, 0.07373918839016586, -0.2773660450207198, -0.4891356512972409, -0.1984531632708915], [6.363636363636363, -0.2771074482151921, 0.047341242180011164, -0.28024938968332186, -0.5046211997345295, -0.19592673420100462], [6.4646464646464645, -0.22990774040723888, 0.03399185662797781, -0.27817955737064026, -0.5300669238113668, -0.2009605578581351], [6.565656565656566, -0.247208296863045, 0.06971485115779141, -0.32490633573492705, -0.5582126128980698, -0.2379792708111722], [6.666666666666667, -0.2811584134577621, 0.07560305350477552, -0.34062247894336983, -0.5150810500644661, -0.24204238462556424], [6.767676767676767, -0.29449004681250396, 0.07772345468191749, -0.29928367052629923, -0.4750991635982146, -0.24530481639912305], [6.8686868686868685, -0.2799609892788868, 0.048578618379818736, -0.3198499427117372, -0.490002535571725, -0.26874732988744454], [6.96969696969697, -0.26816176890271204, 0.05228706573876557, -0.34415406414941907, -0.47727300718306875, -0.27156709090924297], [7.070707070707071, -0.30746963868838345, 0.06456160426303158, -0.37468391430554404, -0.4904522366298751, -0.24944133366185184], [7.171717171717171, -0.28473043852161223, 0.014681284156053215, -0.3442503709372601, -0.44315623156191186, -0.2328630121878762], [7.2727272727272725, -0.3006839681073355, -0.026180049115625166, -0.3309674475535583, -0.4925881386845059, -0.28116161629762204], [7.373737373737374, -0.2660403084430526, -0.015361533794119381, -0.3692640655375995, -0.47885463453400384, -0.2687298516359652], [7.474747474747475, -0.2799769949600811, 0.009071664580074329, -0.32983668167969604, -0.49700349132608174, -0.24687151952322914], [7.575757575757575, -0.2373316952574477, 0.02610900379398397, -0.3223905228270726, -0.52868474637736, -0.23021792961540344], [7.6767676767676765, -0.20693476113461584, -0.02161568667654699, -0.28672286985466766, -0.5143981045126389, -0.1829900990482748], [7.777777777777778, -0.1967312792407616, -0.05950960685374057, -0.32514129247554224, -0.5106211048029006, -0.16553970448595756], [7.878787878787879, -0.1707114234338979, -0.05818114791853388, -0.305110532590229, -0.4659446406683696, -0.13376856487827843], [7.979797979797979, -0.14530016550905547, -0.031656058877641946, -0.296772955933817, -0.4792090416598968, -0.14881002478058808], [8.080808080808081, -0.18655952762149391, 0.012237964994386646, -0.2699519307921946, -0.46443007537506115, -0.13815334396210743], [8.181818181818182, -0.14120667128089764, -0.02681959356367805, -0.2377344748679691, -0.4434023945206471, -0.18028826818590443], [8.282828282828282, -0.1338184827173279, -0.01907503553178202, -0.2796249688199914, -0.41267080407114975, -0.1400862386066447], [8.383838383838384, -0.16052431571778075, 0.004927814964765617, -0.23308130725364679, -0.393943855475159, -0.09217690205866175], [8.484848484848484, -0.12221194243507202, -0.033617194135248135, -0.26569609149096834, -0.37500167083783176, -0.11007699975101273], [8.585858585858587, -0.15253667202140847, 0.0068694866144627595, -0.23653982688556358, -0.34200644080120457, -0.06414951491623636], [8.686868686868687, -0.17216125086985032, 0.022936518000768468, -0.2178667448715532, -0.38440452833399624, -0.08033538160766843], [8.787878787878787, -0.19681205131002433, 0.008329358643001604, -0.2640508349348073, -0.4031816676167727, -0.045186966950801245], [8.88888888888889, -0.21903774569192083, 0.010362034081264026, -0.2272082173014141, -0.41699984586165467, -0.02548925604685842], [8.98989898989899, -0.18380401700522864, 0.03985820792430089, -0.19509061832534064, -0.3758166974661072, 0.007707945235586447], [9.09090909090909, -0.16059273946710256, 0.05711981701828589, -0.1643123187638309, -0.3286932938344595, -0.030032954297637506], [9.191919191919192, -0.14878963557280522, 0.08097555359376327, -0.16452178642960538, -0.31388354118958967, -0.04645358528334688], [9.292929292929292, -0.1820940611003773, 0.07810546111494687, -0.14907144853007043, -0.3460817304134155, -0.019884398101733383], [9.393939393939394, -0.21786969593562933, 0.054773148703670935, -0.12424556381918925, -0.3613268941101826, 0.023543771143064475], [9.494949494949495, -0.26416169063053363, 0.028022668087839094, -0.10346822408854955, -0.3959054385603573, -0.006327913242455064], [9.595959595959595, -0.2633768133648387, -0.004947257877993019, -0.1265409078762941, -0.3990896163392384, -0.0013340653895893458], [9.696969696969697, -0.22114516677126006, -0.028196868893181418, -0.14381142786963882, -0.4235355240151941, -0.015328579602006067], [9.797979797979798, -0.21151350901212917, -0.042822894434199135, -0.12845923731541592, -0.4657574485991306, -0.02486112660272443], [9.8989898989899, -0.21634453608835108, -0.08161770317431144, -0.09398637072325826, -0.4563299860270409, -0.021559011597874905], [10.0, -0.17748555388906045, -0.11924089872311222, -0.13607544951435405, -0.4600897021982045, -0.004357569293283407]]}, \"id\": \"el5024560874960\"});\n",
" }(mpld3);\n",
"}else if(typeof define === \"function\" && define.amd){\n",
" // require.js is available: use it to load d3/mpld3\n",
" require.config({paths: {d3: \"https://mpld3.github.io/js/d3.v3.min\"}});\n",
" require([\"d3\"], function(d3){\n",
" window.d3 = d3;\n",
" mpld3_load_lib(\"https://mpld3.github.io/js/mpld3.v0.2.js\", function(){\n",
" \n",
" mpld3.register_plugin(\"interactive_legend\", InteractiveLegend);\n",
" InteractiveLegend.prototype = Object.create(mpld3.Plugin.prototype);\n",
" InteractiveLegend.prototype.constructor = InteractiveLegend;\n",
" InteractiveLegend.prototype.requiredProps = [\"line_ids\", \"labels\"];\n",
" InteractiveLegend.prototype.defaultProps = {}\n",
" function InteractiveLegend(fig, props){\n",
" mpld3.Plugin.call(this, fig, props);\n",
" };\n",
"\n",
" InteractiveLegend.prototype.draw = function(){\n",
" var labels = new Array();\n",
" for(var i=0; i<this.props.labels.length; i++){\n",
" var obj = {}\n",
" obj.label = this.props.labels[i]\n",
" obj.line = mpld3.get_element(this.props.line_ids[i], this.fig)\n",
" obj.visible = false;\n",
" labels.push(obj);\n",
" }\n",
" \n",
" var ax = this.fig.axes[0]\n",
" var legend = this.fig.canvas.append(\"svg:g\")\n",
" .attr(\"class\", \"legend\");\n",
" \n",
" // add the rectangles\n",
" legend.selectAll(\"rect\")\n",
" .data(labels)\n",
" .enter().append(\"rect\")\n",
" .attr(\"height\",10)\n",
" .attr(\"width\", 25)\n",
" .attr(\"x\",ax.width+10+ax.position[0])\n",
" .attr(\"y\",function(d,i) {\n",
" return ax.position[1]+ i * 25 - 10;})\n",
" .attr(\"stroke\", function(d) {\n",
" return d.line.props.edgecolor})\n",
" .attr(\"class\", \"legend-box\")\n",
" .style(\"fill\", \"white\")\n",
" .on(\"click\", click)\n",
" \n",
" // add the text\n",
" legend.selectAll(\"text\")\n",
" .data(labels)\n",
" .enter().append(\"text\")\n",
" .attr(\"x\", function (d) {\n",
" return ax.width+10+ax.position[0] + 25 + 15\n",
" })\n",
" .attr(\"y\", function(d,i) { \n",
" return ax.position[1]+ i * 25\n",
" })\n",
" .text(function(d) { return d.label })\n",
" \n",
" // specify the action on click\n",
" function click(d,i){\n",
" d.visible = !d.visible;\n",
" d3.select(this)\n",
" .style(\"fill\",function(d, i) {\n",
" console.log(d)\n",
" var color = d.line.props.edgecolor\n",
" return d.visible ? color : \"white\";\n",
" })\n",
" d3.select(d.line.path[0][0])\n",
" .style(\"stroke-opacity\", d.visible ? 1 : d.line.props.alpha);\n",
" \n",
" }\n",
" };\n",
" \n",
" mpld3.draw_figure(\"fig_el50245608749607465326996\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.19999999999999996], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 6, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563703184\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563803856\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878288\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878800\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563879312\"}], \"markers\": [], \"id\": \"el5024553698064\", \"ydomain\": [-0.60000000000000009, 0.19999999999999996], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.125, 0.77500000000000002, 0.77500000000000002]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"line_ids\": [\"el5024563703184\", \"el5024563803856\", \"el5024563878288\", \"el5024563878800\", \"el5024563879312\"], \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"type\": \"interactive_legend\"}], \"data\": {\"data01\": [[0.0, 0.0006651280693574457, -0.02691429854739549, -0.015357782842745216, -0.018118559853887252, 0.04806855716432506], [0.10101010101010101, -0.015180943238921085, -0.02723868310076905, 0.02949580636815275, -0.042710509835411296, 0.006540503919339601], [0.20202020202020202, -0.038100079491694416, -0.05365840692290541, 0.014970293964631426, 0.005552839038977082, -0.03141369674358736], [0.30303030303030304, -0.006029057389416455, -0.06305033228209696, 0.015470619014278425, -0.015440747291971951, -0.061468267198859214], [0.40404040404040403, -0.013001990162756757, -0.019716233657251246, 0.0284212724388109, -0.03240659665187046, -0.04417334831919084], [0.5050505050505051, -0.027509705421151998, 0.01773833563260946, -0.005766907031226141, -0.05885281265200493, -0.0663179215224472], [0.6060606060606061, -0.049844142070553654, -0.022566275892556165, -0.009222910276668626, -0.09855602658277252, -0.10581997629077601], [0.7070707070707071, -0.020364580044919055, -0.0645638087618266, -0.02796426781058786, -0.08081223410729352, -0.13876672018213296], [0.8080808080808081, 0.0013124883163326204, -0.03551386536032641, -0.03736391836936499, -0.05278295085387612, -0.171150686472464], [0.9090909090909091, -0.02006473629330968, -0.07358192404139807, -0.028717545262501722, -0.06254821022635307, -0.194366521896543], [1.0101010101010102, -0.03393397252640795, -0.08377121367440692, -0.06503713307461421, -0.046329676643637116, -0.18274591820008293], [1.1111111111111112, -0.03167372423953109, -0.08256138010605313, -0.11497065361108104, -0.017871412552172602, -0.23263557567911047], [1.2121212121212122, -0.005587627084298632, -0.08438293331608634, -0.10979940878709572, -0.025806112077680153, -0.25298834969602746], [1.3131313131313131, -0.01535841327282669, -0.09136912214005333, -0.1562677010856286, -0.006342369491538789, -0.23173372750924964], [1.4141414141414141, -0.044209779303758794, -0.06012267464848785, -0.15290790748194008, -0.019189048297410735, -0.2254862884935831], [1.5151515151515151, -0.04876010429563478, -0.044661950917831934, -0.18159847790430497, -0.04751244296320979, -0.2257314578040844], [1.6161616161616161, -0.011378901245018683, -0.012165761817389917, -0.15337595427626827, -0.009929612846032408, -0.18372943345690373], [1.7171717171717171, -0.01887621305071801, -0.028063853740882338, -0.18502807648763886, -0.03517530555062735, -0.2178873390767503], [1.8181818181818181, -0.04823008593238849, -0.046165376733057165, -0.2102782037398032, -0.002111959227330991, -0.1965810018601539], [1.9191919191919191, -0.043072586103440474, -0.07489341375642035, -0.20849148609378823, -0.00020860203029152277, -0.20133292090649602], [2.0202020202020203, -0.06205181143857365, -0.12192479027575209, -0.19818386421279602, -0.04991840731979827, -0.1999870611335541], [2.121212121212121, -0.05006189335250227, -0.08805882560916076, -0.1792809589129528, -0.0723784729200744, -0.19099492637314425], [2.2222222222222223, -0.02470013583479174, -0.10360868724949344, -0.1644512492979869, -0.09873293754843532, -0.1684415281703315], [2.323232323232323, -0.01004627661422817, -0.0958113124350431, -0.1505815649453592, -0.058984248033256886, -0.20436186831148262], [2.4242424242424243, 0.01592052608247424, -0.05440258884660488, -0.19585786357116855, -0.0953166151434912, -0.1650762005437762], [2.525252525252525, -0.012590599080221112, -0.07294291054174874, -0.20779291787330031, -0.07816603930710828, -0.14929827876613247], [2.6262626262626263, 0.02599833770188018, -0.03553002650017657, -0.257201008112498, -0.09760423614197716, -0.15557935133770484], [2.727272727272727, 0.0004934356658609258, 0.00713285287987564, -0.24601356731879867, -0.12437801599897988, -0.1299444507396649], [2.8282828282828283, 0.03754869961248147, 0.05636313120266595, -0.2801576127716724, -0.16760021820330334, -0.17445548426655078], [2.929292929292929, 0.025710242941354666, 0.07605959642500308, -0.29988763828399384, -0.21203251255826192, -0.19020193685751247], [3.0303030303030303, 0.004416688468096706, 0.02960187692095831, -0.30580224727131167, -0.2553909028337399, -0.1589597290097198], [3.131313131313131, -0.015863457508693928, 0.010524605304644233, -0.2853418443587777, -0.30226509792535305, -0.1321826155102086], [3.2323232323232323, -0.02149902629361818, 0.01963047450185951, -0.24351538979976312, -0.31933177914879596, -0.14719093408734152], [3.3333333333333335, -0.059592099930994694, -0.00940365221723035, -0.22193551771302297, -0.3251198047895543, -0.10155520732114545], [3.4343434343434343, -0.06790386576143723, -0.050122954454927794, -0.2044823989756481, -0.37327933457086204, -0.1227256319968058], [3.5353535353535355, -0.10033458289237895, -0.06486952000465349, -0.16626729702636547, -0.36294240605401423, -0.11354929003987778], [3.6363636363636362, -0.10977830261052962, -0.07059110594017644, -0.18142149521376819, -0.3960993461915271, -0.11663720092658984], [3.7373737373737375, -0.11903807271270486, -0.045904656420232184, -0.21373712543801485, -0.44146054789613887, -0.14828132227947372], [3.8383838383838382, -0.11170395788283538, -0.007138183357274085, -0.22848082889416496, -0.45476693681715896, -0.1342319735348], [3.9393939393939394, -0.06268045065957126, 0.0019375525039735404, -0.23345264344968933, -0.45892951468775656, -0.14814890908031897], [4.040404040404041, -0.08517440420764788, 0.04141204733845055, -0.2258325623615909, -0.4497446918351429, -0.1385152783140812], [4.141414141414141, -0.0794694809698281, 0.07704911888982452, -0.18970622074137583, -0.42302173267131427, -0.1065239820747619], [4.242424242424242, -0.09004261746248687, 0.06575693459089713, -0.236827933108535, -0.4395609150107741, -0.13345993551001734], [4.343434343434343, -0.07846928904340027, 0.04656502823089041, -0.21838559696761556, -0.4521825792579512, -0.18268910006422226], [4.444444444444445, -0.09203264111779338, 0.02176287012878336, -0.25639763226320406, -0.4822478027123101, -0.19554895010228704], [4.545454545454545, -0.06122898890269113, 0.03661537554850303, -0.2512325870289916, -0.43810147279455525, -0.19516569703064027], [4.646464646464646, -0.07258966707212802, 0.08157510066640455, -0.28256236832762516, -0.4251764992853453, -0.18862569520482084], [4.747474747474747, -0.09775430594386891, 0.12031081228330975, -0.27926829424828153, -0.42210125166367884, -0.21199574745654992], [4.848484848484849, -0.06492433156855924, 0.07282313963990666, -0.2964954555704868, -0.4080891885165106, -0.1861747061899108], [4.94949494949495, -0.10565223323033937, 0.07991604980599501, -0.3232400080010069, -0.39237106815181017, -0.155230013514082], [5.05050505050505, -0.12772626774781398, 0.09205288297471526, -0.2859923822273627, -0.39615166168591354, -0.13261689183413505], [5.151515151515151, -0.1416436032306556, 0.07682439397927168, -0.2690071173158092, -0.3711271119619567, -0.1707596158675162], [5.252525252525253, -0.17391161973448682, 0.060424018547744776, -0.2222370784688833, -0.4175128017487232, -0.15465074347754637], [5.353535353535354, -0.15475547368850817, 0.079811315680108, -0.24841897529284473, -0.3878385608148108, -0.12662530706261688], [5.454545454545454, -0.2044184007746567, 0.09965287918102145, -0.2909604635284064, -0.3750930938358069, -0.08953945758536101], [5.555555555555555, -0.18234430271958907, 0.05976113976406608, -0.3223327588211213, -0.36941921721576537, -0.1309871911591653], [5.656565656565657, -0.22376038895799008, 0.022369144773287226, -0.3564216121296211, -0.3946537777528778, -0.1803463783770605], [5.757575757575758, -0.25523156214543, 0.040093200795772915, -0.333969557667297, -0.4228899805972698, -0.13068252886420734], [5.858585858585858, -0.3028450902058368, -0.004393272496235376, -0.3174653157865831, -0.42583857129026065, -0.15223874308459498], [5.959595959595959, -0.3094786137662415, 0.020086230066749648, -0.3195177049380128, -0.38882928460551597, -0.17968879147411126], [6.0606060606060606, -0.2830023730097908, -0.0001701342198213926, -0.2771346763129652, -0.4338847380935227, -0.19329486288288358], [6.161616161616162, -0.25987845049349834, 0.027834735797977274, -0.24475009557376948, -0.47972464023888234, -0.17011725956065707], [6.262626262626262, -0.2679729806744808, 0.07373918839016586, -0.2773660450207198, -0.4891356512972409, -0.1984531632708915], [6.363636363636363, -0.2771074482151921, 0.047341242180011164, -0.28024938968332186, -0.5046211997345295, -0.19592673420100462], [6.4646464646464645, -0.22990774040723888, 0.03399185662797781, -0.27817955737064026, -0.5300669238113668, -0.2009605578581351], [6.565656565656566, -0.247208296863045, 0.06971485115779141, -0.32490633573492705, -0.5582126128980698, -0.2379792708111722], [6.666666666666667, -0.2811584134577621, 0.07560305350477552, -0.34062247894336983, -0.5150810500644661, -0.24204238462556424], [6.767676767676767, -0.29449004681250396, 0.07772345468191749, -0.29928367052629923, -0.4750991635982146, -0.24530481639912305], [6.8686868686868685, -0.2799609892788868, 0.048578618379818736, -0.3198499427117372, -0.490002535571725, -0.26874732988744454], [6.96969696969697, -0.26816176890271204, 0.05228706573876557, -0.34415406414941907, -0.47727300718306875, -0.27156709090924297], [7.070707070707071, -0.30746963868838345, 0.06456160426303158, -0.37468391430554404, -0.4904522366298751, -0.24944133366185184], [7.171717171717171, -0.28473043852161223, 0.014681284156053215, -0.3442503709372601, -0.44315623156191186, -0.2328630121878762], [7.2727272727272725, -0.3006839681073355, -0.026180049115625166, -0.3309674475535583, -0.4925881386845059, -0.28116161629762204], [7.373737373737374, -0.2660403084430526, -0.015361533794119381, -0.3692640655375995, -0.47885463453400384, -0.2687298516359652], [7.474747474747475, -0.2799769949600811, 0.009071664580074329, -0.32983668167969604, -0.49700349132608174, -0.24687151952322914], [7.575757575757575, -0.2373316952574477, 0.02610900379398397, -0.3223905228270726, -0.52868474637736, -0.23021792961540344], [7.6767676767676765, -0.20693476113461584, -0.02161568667654699, -0.28672286985466766, -0.5143981045126389, -0.1829900990482748], [7.777777777777778, -0.1967312792407616, -0.05950960685374057, -0.32514129247554224, -0.5106211048029006, -0.16553970448595756], [7.878787878787879, -0.1707114234338979, -0.05818114791853388, -0.305110532590229, -0.4659446406683696, -0.13376856487827843], [7.979797979797979, -0.14530016550905547, -0.031656058877641946, -0.296772955933817, -0.4792090416598968, -0.14881002478058808], [8.080808080808081, -0.18655952762149391, 0.012237964994386646, -0.2699519307921946, -0.46443007537506115, -0.13815334396210743], [8.181818181818182, -0.14120667128089764, -0.02681959356367805, -0.2377344748679691, -0.4434023945206471, -0.18028826818590443], [8.282828282828282, -0.1338184827173279, -0.01907503553178202, -0.2796249688199914, -0.41267080407114975, -0.1400862386066447], [8.383838383838384, -0.16052431571778075, 0.004927814964765617, -0.23308130725364679, -0.393943855475159, -0.09217690205866175], [8.484848484848484, -0.12221194243507202, -0.033617194135248135, -0.26569609149096834, -0.37500167083783176, -0.11007699975101273], [8.585858585858587, -0.15253667202140847, 0.0068694866144627595, -0.23653982688556358, -0.34200644080120457, -0.06414951491623636], [8.686868686868687, -0.17216125086985032, 0.022936518000768468, -0.2178667448715532, -0.38440452833399624, -0.08033538160766843], [8.787878787878787, -0.19681205131002433, 0.008329358643001604, -0.2640508349348073, -0.4031816676167727, -0.045186966950801245], [8.88888888888889, -0.21903774569192083, 0.010362034081264026, -0.2272082173014141, -0.41699984586165467, -0.02548925604685842], [8.98989898989899, -0.18380401700522864, 0.03985820792430089, -0.19509061832534064, -0.3758166974661072, 0.007707945235586447], [9.09090909090909, -0.16059273946710256, 0.05711981701828589, -0.1643123187638309, -0.3286932938344595, -0.030032954297637506], [9.191919191919192, -0.14878963557280522, 0.08097555359376327, -0.16452178642960538, -0.31388354118958967, -0.04645358528334688], [9.292929292929292, -0.1820940611003773, 0.07810546111494687, -0.14907144853007043, -0.3460817304134155, -0.019884398101733383], [9.393939393939394, -0.21786969593562933, 0.054773148703670935, -0.12424556381918925, -0.3613268941101826, 0.023543771143064475], [9.494949494949495, -0.26416169063053363, 0.028022668087839094, -0.10346822408854955, -0.3959054385603573, -0.006327913242455064], [9.595959595959595, -0.2633768133648387, -0.004947257877993019, -0.1265409078762941, -0.3990896163392384, -0.0013340653895893458], [9.696969696969697, -0.22114516677126006, -0.028196868893181418, -0.14381142786963882, -0.4235355240151941, -0.015328579602006067], [9.797979797979798, -0.21151350901212917, -0.042822894434199135, -0.12845923731541592, -0.4657574485991306, -0.02486112660272443], [9.8989898989899, -0.21634453608835108, -0.08161770317431144, -0.09398637072325826, -0.4563299860270409, -0.021559011597874905], [10.0, -0.17748555388906045, -0.11924089872311222, -0.13607544951435405, -0.4600897021982045, -0.004357569293283407]]}, \"id\": \"el5024560874960\"});\n",
" });\n",
" });\n",
"}else{\n",
" // require.js not available: dynamically load d3 & mpld3\n",
" mpld3_load_lib(\"https://mpld3.github.io/js/d3.v3.min.js\", function(){\n",
" mpld3_load_lib(\"https://mpld3.github.io/js/mpld3.v0.2.js\", function(){\n",
" \n",
" mpld3.register_plugin(\"interactive_legend\", InteractiveLegend);\n",
" InteractiveLegend.prototype = Object.create(mpld3.Plugin.prototype);\n",
" InteractiveLegend.prototype.constructor = InteractiveLegend;\n",
" InteractiveLegend.prototype.requiredProps = [\"line_ids\", \"labels\"];\n",
" InteractiveLegend.prototype.defaultProps = {}\n",
" function InteractiveLegend(fig, props){\n",
" mpld3.Plugin.call(this, fig, props);\n",
" };\n",
"\n",
" InteractiveLegend.prototype.draw = function(){\n",
" var labels = new Array();\n",
" for(var i=0; i<this.props.labels.length; i++){\n",
" var obj = {}\n",
" obj.label = this.props.labels[i]\n",
" obj.line = mpld3.get_element(this.props.line_ids[i], this.fig)\n",
" obj.visible = false;\n",
" labels.push(obj);\n",
" }\n",
" \n",
" var ax = this.fig.axes[0]\n",
" var legend = this.fig.canvas.append(\"svg:g\")\n",
" .attr(\"class\", \"legend\");\n",
" \n",
" // add the rectangles\n",
" legend.selectAll(\"rect\")\n",
" .data(labels)\n",
" .enter().append(\"rect\")\n",
" .attr(\"height\",10)\n",
" .attr(\"width\", 25)\n",
" .attr(\"x\",ax.width+10+ax.position[0])\n",
" .attr(\"y\",function(d,i) {\n",
" return ax.position[1]+ i * 25 - 10;})\n",
" .attr(\"stroke\", function(d) {\n",
" return d.line.props.edgecolor})\n",
" .attr(\"class\", \"legend-box\")\n",
" .style(\"fill\", \"white\")\n",
" .on(\"click\", click)\n",
" \n",
" // add the text\n",
" legend.selectAll(\"text\")\n",
" .data(labels)\n",
" .enter().append(\"text\")\n",
" .attr(\"x\", function (d) {\n",
" return ax.width+10+ax.position[0] + 25 + 15\n",
" })\n",
" .attr(\"y\", function(d,i) { \n",
" return ax.position[1]+ i * 25\n",
" })\n",
" .text(function(d) { return d.label })\n",
" \n",
" // specify the action on click\n",
" function click(d,i){\n",
" d.visible = !d.visible;\n",
" d3.select(this)\n",
" .style(\"fill\",function(d, i) {\n",
" console.log(d)\n",
" var color = d.line.props.edgecolor\n",
" return d.visible ? color : \"white\";\n",
" })\n",
" d3.select(d.line.path[0][0])\n",
" .style(\"stroke-opacity\", d.visible ? 1 : d.line.props.alpha);\n",
" \n",
" }\n",
" };\n",
" \n",
" mpld3.draw_figure(\"fig_el50245608749607465326996\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.19999999999999996], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 6, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563703184\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563803856\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878288\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563878800\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el5024563879312\"}], \"markers\": [], \"id\": \"el5024553698064\", \"ydomain\": [-0.60000000000000009, 0.19999999999999996], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.125, 0.77500000000000002, 0.77500000000000002]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"line_ids\": [\"el5024563703184\", \"el5024563803856\", \"el5024563878288\", \"el5024563878800\", \"el5024563879312\"], \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"type\": \"interactive_legend\"}], \"data\": {\"data01\": [[0.0, 0.0006651280693574457, -0.02691429854739549, -0.015357782842745216, -0.018118559853887252, 0.04806855716432506], [0.10101010101010101, -0.015180943238921085, -0.02723868310076905, 0.02949580636815275, -0.042710509835411296, 0.006540503919339601], [0.20202020202020202, -0.038100079491694416, -0.05365840692290541, 0.014970293964631426, 0.005552839038977082, -0.03141369674358736], [0.30303030303030304, -0.006029057389416455, -0.06305033228209696, 0.015470619014278425, -0.015440747291971951, -0.061468267198859214], [0.40404040404040403, -0.013001990162756757, -0.019716233657251246, 0.0284212724388109, -0.03240659665187046, -0.04417334831919084], [0.5050505050505051, -0.027509705421151998, 0.01773833563260946, -0.005766907031226141, -0.05885281265200493, -0.0663179215224472], [0.6060606060606061, -0.049844142070553654, -0.022566275892556165, -0.009222910276668626, -0.09855602658277252, -0.10581997629077601], [0.7070707070707071, -0.020364580044919055, -0.0645638087618266, -0.02796426781058786, -0.08081223410729352, -0.13876672018213296], [0.8080808080808081, 0.0013124883163326204, -0.03551386536032641, -0.03736391836936499, -0.05278295085387612, -0.171150686472464], [0.9090909090909091, -0.02006473629330968, -0.07358192404139807, -0.028717545262501722, -0.06254821022635307, -0.194366521896543], [1.0101010101010102, -0.03393397252640795, -0.08377121367440692, -0.06503713307461421, -0.046329676643637116, -0.18274591820008293], [1.1111111111111112, -0.03167372423953109, -0.08256138010605313, -0.11497065361108104, -0.017871412552172602, -0.23263557567911047], [1.2121212121212122, -0.005587627084298632, -0.08438293331608634, -0.10979940878709572, -0.025806112077680153, -0.25298834969602746], [1.3131313131313131, -0.01535841327282669, -0.09136912214005333, -0.1562677010856286, -0.006342369491538789, -0.23173372750924964], [1.4141414141414141, -0.044209779303758794, -0.06012267464848785, -0.15290790748194008, -0.019189048297410735, -0.2254862884935831], [1.5151515151515151, -0.04876010429563478, -0.044661950917831934, -0.18159847790430497, -0.04751244296320979, -0.2257314578040844], [1.6161616161616161, -0.011378901245018683, -0.012165761817389917, -0.15337595427626827, -0.009929612846032408, -0.18372943345690373], [1.7171717171717171, -0.01887621305071801, -0.028063853740882338, -0.18502807648763886, -0.03517530555062735, -0.2178873390767503], [1.8181818181818181, -0.04823008593238849, -0.046165376733057165, -0.2102782037398032, -0.002111959227330991, -0.1965810018601539], [1.9191919191919191, -0.043072586103440474, -0.07489341375642035, -0.20849148609378823, -0.00020860203029152277, -0.20133292090649602], [2.0202020202020203, -0.06205181143857365, -0.12192479027575209, -0.19818386421279602, -0.04991840731979827, -0.1999870611335541], [2.121212121212121, -0.05006189335250227, -0.08805882560916076, -0.1792809589129528, -0.0723784729200744, -0.19099492637314425], [2.2222222222222223, -0.02470013583479174, -0.10360868724949344, -0.1644512492979869, -0.09873293754843532, -0.1684415281703315], [2.323232323232323, -0.01004627661422817, -0.0958113124350431, -0.1505815649453592, -0.058984248033256886, -0.20436186831148262], [2.4242424242424243, 0.01592052608247424, -0.05440258884660488, -0.19585786357116855, -0.0953166151434912, -0.1650762005437762], [2.525252525252525, -0.012590599080221112, -0.07294291054174874, -0.20779291787330031, -0.07816603930710828, -0.14929827876613247], [2.6262626262626263, 0.02599833770188018, -0.03553002650017657, -0.257201008112498, -0.09760423614197716, -0.15557935133770484], [2.727272727272727, 0.0004934356658609258, 0.00713285287987564, -0.24601356731879867, -0.12437801599897988, -0.1299444507396649], [2.8282828282828283, 0.03754869961248147, 0.05636313120266595, -0.2801576127716724, -0.16760021820330334, -0.17445548426655078], [2.929292929292929, 0.025710242941354666, 0.07605959642500308, -0.29988763828399384, -0.21203251255826192, -0.19020193685751247], [3.0303030303030303, 0.004416688468096706, 0.02960187692095831, -0.30580224727131167, -0.2553909028337399, -0.1589597290097198], [3.131313131313131, -0.015863457508693928, 0.010524605304644233, -0.2853418443587777, -0.30226509792535305, -0.1321826155102086], [3.2323232323232323, -0.02149902629361818, 0.01963047450185951, -0.24351538979976312, -0.31933177914879596, -0.14719093408734152], [3.3333333333333335, -0.059592099930994694, -0.00940365221723035, -0.22193551771302297, -0.3251198047895543, -0.10155520732114545], [3.4343434343434343, -0.06790386576143723, -0.050122954454927794, -0.2044823989756481, -0.37327933457086204, -0.1227256319968058], [3.5353535353535355, -0.10033458289237895, -0.06486952000465349, -0.16626729702636547, -0.36294240605401423, -0.11354929003987778], [3.6363636363636362, -0.10977830261052962, -0.07059110594017644, -0.18142149521376819, -0.3960993461915271, -0.11663720092658984], [3.7373737373737375, -0.11903807271270486, -0.045904656420232184, -0.21373712543801485, -0.44146054789613887, -0.14828132227947372], [3.8383838383838382, -0.11170395788283538, -0.007138183357274085, -0.22848082889416496, -0.45476693681715896, -0.1342319735348], [3.9393939393939394, -0.06268045065957126, 0.0019375525039735404, -0.23345264344968933, -0.45892951468775656, -0.14814890908031897], [4.040404040404041, -0.08517440420764788, 0.04141204733845055, -0.2258325623615909, -0.4497446918351429, -0.1385152783140812], [4.141414141414141, -0.0794694809698281, 0.07704911888982452, -0.18970622074137583, -0.42302173267131427, -0.1065239820747619], [4.242424242424242, -0.09004261746248687, 0.06575693459089713, -0.236827933108535, -0.4395609150107741, -0.13345993551001734], [4.343434343434343, -0.07846928904340027, 0.04656502823089041, -0.21838559696761556, -0.4521825792579512, -0.18268910006422226], [4.444444444444445, -0.09203264111779338, 0.02176287012878336, -0.25639763226320406, -0.4822478027123101, -0.19554895010228704], [4.545454545454545, -0.06122898890269113, 0.03661537554850303, -0.2512325870289916, -0.43810147279455525, -0.19516569703064027], [4.646464646464646, -0.07258966707212802, 0.08157510066640455, -0.28256236832762516, -0.4251764992853453, -0.18862569520482084], [4.747474747474747, -0.09775430594386891, 0.12031081228330975, -0.27926829424828153, -0.42210125166367884, -0.21199574745654992], [4.848484848484849, -0.06492433156855924, 0.07282313963990666, -0.2964954555704868, -0.4080891885165106, -0.1861747061899108], [4.94949494949495, -0.10565223323033937, 0.07991604980599501, -0.3232400080010069, -0.39237106815181017, -0.155230013514082], [5.05050505050505, -0.12772626774781398, 0.09205288297471526, -0.2859923822273627, -0.39615166168591354, -0.13261689183413505], [5.151515151515151, -0.1416436032306556, 0.07682439397927168, -0.2690071173158092, -0.3711271119619567, -0.1707596158675162], [5.252525252525253, -0.17391161973448682, 0.060424018547744776, -0.2222370784688833, -0.4175128017487232, -0.15465074347754637], [5.353535353535354, -0.15475547368850817, 0.079811315680108, -0.24841897529284473, -0.3878385608148108, -0.12662530706261688], [5.454545454545454, -0.2044184007746567, 0.09965287918102145, -0.2909604635284064, -0.3750930938358069, -0.08953945758536101], [5.555555555555555, -0.18234430271958907, 0.05976113976406608, -0.3223327588211213, -0.36941921721576537, -0.1309871911591653], [5.656565656565657, -0.22376038895799008, 0.022369144773287226, -0.3564216121296211, -0.3946537777528778, -0.1803463783770605], [5.757575757575758, -0.25523156214543, 0.040093200795772915, -0.333969557667297, -0.4228899805972698, -0.13068252886420734], [5.858585858585858, -0.3028450902058368, -0.004393272496235376, -0.3174653157865831, -0.42583857129026065, -0.15223874308459498], [5.959595959595959, -0.3094786137662415, 0.020086230066749648, -0.3195177049380128, -0.38882928460551597, -0.17968879147411126], [6.0606060606060606, -0.2830023730097908, -0.0001701342198213926, -0.2771346763129652, -0.4338847380935227, -0.19329486288288358], [6.161616161616162, -0.25987845049349834, 0.027834735797977274, -0.24475009557376948, -0.47972464023888234, -0.17011725956065707], [6.262626262626262, -0.2679729806744808, 0.07373918839016586, -0.2773660450207198, -0.4891356512972409, -0.1984531632708915], [6.363636363636363, -0.2771074482151921, 0.047341242180011164, -0.28024938968332186, -0.5046211997345295, -0.19592673420100462], [6.4646464646464645, -0.22990774040723888, 0.03399185662797781, -0.27817955737064026, -0.5300669238113668, -0.2009605578581351], [6.565656565656566, -0.247208296863045, 0.06971485115779141, -0.32490633573492705, -0.5582126128980698, -0.2379792708111722], [6.666666666666667, -0.2811584134577621, 0.07560305350477552, -0.34062247894336983, -0.5150810500644661, -0.24204238462556424], [6.767676767676767, -0.29449004681250396, 0.07772345468191749, -0.29928367052629923, -0.4750991635982146, -0.24530481639912305], [6.8686868686868685, -0.2799609892788868, 0.048578618379818736, -0.3198499427117372, -0.490002535571725, -0.26874732988744454], [6.96969696969697, -0.26816176890271204, 0.05228706573876557, -0.34415406414941907, -0.47727300718306875, -0.27156709090924297], [7.070707070707071, -0.30746963868838345, 0.06456160426303158, -0.37468391430554404, -0.4904522366298751, -0.24944133366185184], [7.171717171717171, -0.28473043852161223, 0.014681284156053215, -0.3442503709372601, -0.44315623156191186, -0.2328630121878762], [7.2727272727272725, -0.3006839681073355, -0.026180049115625166, -0.3309674475535583, -0.4925881386845059, -0.28116161629762204], [7.373737373737374, -0.2660403084430526, -0.015361533794119381, -0.3692640655375995, -0.47885463453400384, -0.2687298516359652], [7.474747474747475, -0.2799769949600811, 0.009071664580074329, -0.32983668167969604, -0.49700349132608174, -0.24687151952322914], [7.575757575757575, -0.2373316952574477, 0.02610900379398397, -0.3223905228270726, -0.52868474637736, -0.23021792961540344], [7.6767676767676765, -0.20693476113461584, -0.02161568667654699, -0.28672286985466766, -0.5143981045126389, -0.1829900990482748], [7.777777777777778, -0.1967312792407616, -0.05950960685374057, -0.32514129247554224, -0.5106211048029006, -0.16553970448595756], [7.878787878787879, -0.1707114234338979, -0.05818114791853388, -0.305110532590229, -0.4659446406683696, -0.13376856487827843], [7.979797979797979, -0.14530016550905547, -0.031656058877641946, -0.296772955933817, -0.4792090416598968, -0.14881002478058808], [8.080808080808081, -0.18655952762149391, 0.012237964994386646, -0.2699519307921946, -0.46443007537506115, -0.13815334396210743], [8.181818181818182, -0.14120667128089764, -0.02681959356367805, -0.2377344748679691, -0.4434023945206471, -0.18028826818590443], [8.282828282828282, -0.1338184827173279, -0.01907503553178202, -0.2796249688199914, -0.41267080407114975, -0.1400862386066447], [8.383838383838384, -0.16052431571778075, 0.004927814964765617, -0.23308130725364679, -0.393943855475159, -0.09217690205866175], [8.484848484848484, -0.12221194243507202, -0.033617194135248135, -0.26569609149096834, -0.37500167083783176, -0.11007699975101273], [8.585858585858587, -0.15253667202140847, 0.0068694866144627595, -0.23653982688556358, -0.34200644080120457, -0.06414951491623636], [8.686868686868687, -0.17216125086985032, 0.022936518000768468, -0.2178667448715532, -0.38440452833399624, -0.08033538160766843], [8.787878787878787, -0.19681205131002433, 0.008329358643001604, -0.2640508349348073, -0.4031816676167727, -0.045186966950801245], [8.88888888888889, -0.21903774569192083, 0.010362034081264026, -0.2272082173014141, -0.41699984586165467, -0.02548925604685842], [8.98989898989899, -0.18380401700522864, 0.03985820792430089, -0.19509061832534064, -0.3758166974661072, 0.007707945235586447], [9.09090909090909, -0.16059273946710256, 0.05711981701828589, -0.1643123187638309, -0.3286932938344595, -0.030032954297637506], [9.191919191919192, -0.14878963557280522, 0.08097555359376327, -0.16452178642960538, -0.31388354118958967, -0.04645358528334688], [9.292929292929292, -0.1820940611003773, 0.07810546111494687, -0.14907144853007043, -0.3460817304134155, -0.019884398101733383], [9.393939393939394, -0.21786969593562933, 0.054773148703670935, -0.12424556381918925, -0.3613268941101826, 0.023543771143064475], [9.494949494949495, -0.26416169063053363, 0.028022668087839094, -0.10346822408854955, -0.3959054385603573, -0.006327913242455064], [9.595959595959595, -0.2633768133648387, -0.004947257877993019, -0.1265409078762941, -0.3990896163392384, -0.0013340653895893458], [9.696969696969697, -0.22114516677126006, -0.028196868893181418, -0.14381142786963882, -0.4235355240151941, -0.015328579602006067], [9.797979797979798, -0.21151350901212917, -0.042822894434199135, -0.12845923731541592, -0.4657574485991306, -0.02486112660272443], [9.8989898989899, -0.21634453608835108, -0.08161770317431144, -0.09398637072325826, -0.4563299860270409, -0.021559011597874905], [10.0, -0.17748555388906045, -0.11924089872311222, -0.13607544951435405, -0.4600897021982045, -0.004357569293283407]]}, \"id\": \"el5024560874960\"});\n",
" })\n",
" });\n",
"}\n",
"</script>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 28,
"text": [
"<IPython.core.display.HTML at 0x110048750>"
]
}
],
"prompt_number": 28
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 10
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment