Last active
August 29, 2015 14:01
-
-
Save quaquel/19d3a7b3f89688d0b8d4 to your computer and use it in GitHub Desktop.
interactive legend plugin demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:85727c0bce75a8d3d004db29359002b5a426d858c8ee70ed110deb1936a51942" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"import mpld3\n", | |
"from mpld3 import plugins, utils\n", | |
"import collections\n", | |
"\n", | |
"class InteractiveLegendPlugin(plugins.PluginBase):\n", | |
" \"\"\"A plugin for an interactive legends. \n", | |
" \n", | |
" Inspired by http://bl.ocks.org/simzou/6439398\n", | |
" \n", | |
" Parameters\n", | |
" ----------\n", | |
" plot_elements : iterable of matplotliblib elements\n", | |
" the elements to associate with a given legend items\n", | |
" labels : iterable of strings\n", | |
" The labels for each legend element\n", | |
" css : str, optional\n", | |
" css to be included, for styling if desired\n", | |
" ax : matplotlib axes instance, optional\n", | |
" the ax to which the legend belongs. Default is the first\n", | |
" axes\n", | |
" alpha_sel : float, optional\n", | |
" the alpha value to apply to the plot_element(s) associated \n", | |
" with the legend item when the legend item is selected. \n", | |
" Default is 1.0\n", | |
" alpha_unsel : float, optional\n", | |
" the alpha value to apply to the plot_element(s) associated \n", | |
" with the legend item when the legend item is unselected. \n", | |
" Default is 0.2\n", | |
" \n", | |
" Examples\n", | |
" --------\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \"\"\"\n", | |
"\n", | |
" css_ = \"\"\"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \"\"\"\n", | |
" \n", | |
" def __init__(self, plot_elements, labels, ax=None,\n", | |
" alpha_sel=1,alpha_unsel=0.2):\n", | |
" \n", | |
" self.ax = ax\n", | |
" \n", | |
" if ax:\n", | |
" ax = utils.get_id(ax)\n", | |
" \n", | |
" mpld3_element_ids = self._determine_mpld3ids(plot_elements)\n", | |
" self.mpld3_element_ids = mpld3_element_ids\n", | |
" \n", | |
" self.dict_ = {\"type\": \"interactive_legend\",\n", | |
" \"element_ids\": mpld3_element_ids,\n", | |
" \"labels\":labels,\n", | |
" \"ax\":ax,\n", | |
" \"alpha_sel\":alpha_sel,\n", | |
" \"alpha_unsel\":alpha_unsel}\n", | |
" \n", | |
" def _determine_mpld3ids(self, plot_elements):\n", | |
" \"\"\"\n", | |
" Helper function to get the mpld3_id for each\n", | |
" of the specified elements.\n", | |
" \n", | |
" This is a convenience function. You can\n", | |
" now do:\n", | |
" \n", | |
" lines = ax.plot(x,y)\n", | |
" plugins.connect(fig, HighlightLines(lines, labels))\n", | |
" \n", | |
" rather than first having to wrap each entry in\n", | |
" lines in a seperate list.\n", | |
" \n", | |
" \"\"\"\n", | |
"\n", | |
"\n", | |
" mpld3_element_ids = []\n", | |
" \n", | |
" for entry in plot_elements:\n", | |
" if isinstance(entry, collections.Iterable):\n", | |
" mpld3_element_ids.append([utils.get_id(element) for element in entry])\n", | |
" else: \n", | |
" mpld3_element_ids.append([utils.get_id(entry)])\n", | |
"\n", | |
" return mpld3_element_ids\n", | |
"\n" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## simple legend example\n", | |
"\n", | |
"This is the simplest use case for the plugin.\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"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", | |
"line_collections = ax.plot(x, y.T, lw=4, alpha=0.1)\n", | |
"plugins.connect(fig, InteractiveLegendPlugin(line_collections, labels, alpha_unsel=0.1))\n", | |
"\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145359820329407746187\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145359820329407746187\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.39999999999999991], \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414535982096\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148304\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148880\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149328\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149776\"}], \"markers\": [], \"id\": \"el96414535010704\", \"ydomain\": [-0.60000000000000009, 0.39999999999999991], \"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\"}, {\"element_ids\": [[\"el96414535982096\"], [\"el96414536148304\"], [\"el96414536148880\"], [\"el96414536149328\"], [\"el96414536149776\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.1, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.02919656565850928, 0.03911051926247067, 0.00835909509065128, 0.011469033732397639, 0.029087837891629633], [0.10101010101010101, -0.038775556536177584, 0.0651778354259987, -0.022451977409526147, 0.002561632107320135, 0.039559828985605006], [0.20202020202020202, -0.07277297221376493, 0.08315149092835508, -0.0004037173787879364, 0.039587901112342554, 0.036085318060356156], [0.30303030303030304, -0.025995870031037108, 0.03729541769481512, 0.02827436155511527, -0.001813760108685579, 0.005042421652601516], [0.40404040404040403, 0.02244606827175981, 0.03998649234089237, 0.061399371017144135, -0.031602537478822156, 0.032937964403187636], [0.5050505050505051, 0.07070392767578772, 0.013740458051274641, 0.024752207658432543, -0.035755281869505405, 0.0292692517154724], [0.6060606060606061, 0.06476032838860192, 0.05924955751880232, 0.008273773222573652, -0.07732153944054439, -0.019700392357728296], [0.7070707070707071, 0.06951513720731109, 0.012910352092599553, -0.04119193223271102, -0.06389287542280905, 0.013993494086760302], [0.8080808080808081, 0.03142762315239095, 0.01850066824454173, -0.009896761343191895, -0.05336779407043253, -0.004188147898291455], [0.9090909090909091, 0.013256701012417958, 0.058361323814868984, -0.00477733010175565, -0.06344452465169483, 0.041636072281358086], [1.0101010101010102, -0.025298733208502747, 0.07795354043919711, -0.016815695629980244, -0.061238315867821004, 0.08235785875749348], [1.1111111111111112, 0.01973409682293438, 0.11181160061151464, -0.007561497720594557, -0.016794472654474576, 0.10882822201570283], [1.2121212121212122, -0.011540225443875327, 0.11546175825500117, -0.05262668457239648, -0.006329926797746896, 0.1185407622430597], [1.3131313131313131, -0.03471273757700345, 0.11018125192725868, -0.09737304045621478, -0.037011484221353044, 0.13175537436417387], [1.4141414141414141, -0.018743131430966144, 0.07713468685017633, -0.08861288908678436, -0.009256857977774827, 0.12704672560528277], [1.5151515151515151, -0.010144711953850407, 0.09036587341424898, -0.12565932531920257, 0.013866953842483997, 0.11790570727907541], [1.6161616161616161, -0.03693963751964583, 0.06049381395509215, -0.11634128941462497, 0.009017073925264728, 0.14721028607527775], [1.7171717171717171, -0.04268265624745282, 0.09740891970764375, -0.09488996702439978, -0.024071080708922735, 0.1756366077059724], [1.8181818181818181, -0.019991321512933556, 0.10441666479914963, -0.06375768550146858, -0.009592922579477983, 0.14885538254639485], [1.9191919191919191, -0.030879559498083277, 0.11484767772296064, -0.07055543718897432, -0.02150464147189838, 0.11623568353851896], [2.0202020202020203, -0.006247944258162209, 0.12597107764045842, -0.06386577990461301, 0.00550579793156274, 0.1132755586693512], [2.121212121212121, -0.04641874597384463, 0.0762700750455479, -0.11016425297954048, 0.054871751292690424, 0.0998359254807433], [2.2222222222222223, -0.029978047000183444, 0.06051017347463712, -0.14364208402695186, 0.074985423515452, 0.056435581957575746], [2.323232323232323, -0.009184687131261832, 0.0117091078944511, -0.13334948976391223, 0.04889148777938433, 0.04405363454576061], [2.4242424242424243, -0.023842311756506335, 0.028920600355740636, -0.11431780199142243, 0.017081621038084124, 0.004481645333335227], [2.525252525252525, -0.029667726232724685, -0.013399302360641095, -0.1393291809480322, 0.0351658794479748, 0.016802854902278418], [2.6262626262626263, -0.07116189023103124, 0.023778706031428357, -0.1307256990957252, 0.03828061769350794, -0.004332616044781003], [2.727272727272727, -0.034306488028796676, -0.00893978089273284, -0.15568693711619838, 0.05319727636799871, -0.04149176334334681], [2.8282828282828283, 0.0030858178085008264, 0.02441772920665638, -0.10714598315809404, 0.05796725299234093, -0.06119461400494833], [2.929292929292929, 0.012473495075885214, -0.020882940269173707, -0.11887439010073847, 0.04631743293965706, -0.013896209432282848], [3.0303030303030303, 0.02093299773777564, -0.049535899219983415, -0.09902077491772182, 0.04241816252497095, -0.009621456279095376], [3.131313131313131, 0.02606659411912944, -0.0051905366079272736, -0.10743493000961282, 0.03642241876882708, 0.029462197146333437], [3.2323232323232323, 0.010392321229365266, -0.039904972840206054, -0.060378683411864614, 0.043462704372728214, 0.021349689653220094], [3.3333333333333335, -0.01258562041189364, -0.01301664227466389, -0.056099906144916896, 0.08042152431649563, 0.05869347761680129], [3.4343434343434343, 0.03114120101036628, -0.048572950707986215, -0.09773716706306096, 0.12274192393900399, 0.06753913385353447], [3.5353535353535355, 0.07698421007961331, -0.0487972323253908, -0.1465535318558468, 0.12669267044937624, 0.05241498399907275], [3.6363636363636362, 0.050736776459522306, -0.06056905033313809, -0.12542475100483236, 0.0822876398286402, 0.03675129105017241], [3.7373737373737375, 0.035158426905400254, -0.08413983388947349, -0.1251142505273902, 0.08101313115451753, 0.02558734130183833], [3.8383838383838382, 0.04380174701016798, -0.12757999677615964, -0.08237005561614326, 0.05975890679993619, -0.004653381996597126], [3.9393939393939394, 0.07739033988528718, -0.11880652681265427, -0.07442813635190462, 0.013123746515780112, -0.03608972000839972], [4.040404040404041, 0.08452210009114945, -0.11506688239844737, -0.04717666598608308, -0.00916502150112707, -0.07636457398372078], [4.141414141414141, 0.12445367574889996, -0.08822067766728489, -0.09597603980593225, -0.058297842805260874, -0.05116179160233768], [4.242424242424242, 0.15955559391700183, -0.08747090095999516, -0.1448134994949512, -0.10812415355692961, -0.012120762112512347], [4.343434343434343, 0.14637168943571818, -0.10952985334762497, -0.1885587827372801, -0.08036147597264204, -0.03131217465125941], [4.444444444444445, 0.16755857554575537, -0.1343316709937456, -0.2337194077618598, -0.11355971224588507, 0.009634396324434143], [4.545454545454545, 0.13252795972283443, -0.16542307650177224, -0.22577664169176861, -0.1387211616110116, 0.05883217073400869], [4.646464646464646, 0.12464615777046958, -0.19137041755169468, -0.18122024364645567, -0.09875296782719808, 0.060780482497816785], [4.747474747474747, 0.07566957332145033, -0.17942973523116326, -0.1657738580809174, -0.09549951855095985, 0.08339455765997313], [4.848484848484849, 0.027463338814274152, -0.20125569109299346, -0.18696574371860417, -0.10554826487870561, 0.1304466478352253], [4.94949494949495, 0.04802294702571806, -0.24873626146858266, -0.15666056020173214, -0.06437065358305553, 0.10503178025389026], [5.05050505050505, 0.06369092279872554, -0.26971756483386783, -0.11114367012073903, -0.05852780026670291, 0.08608157759902604], [5.151515151515151, 0.03552270446261546, -0.2201122029789905, -0.1266474475342908, -0.03558445361333567, 0.09443944082005551], [5.252525252525253, 0.07808598604774747, -0.22011212902718677, -0.0935331951289095, -0.06427479792499445, 0.0810203132393598], [5.353535353535354, 0.04011169580699105, -0.17944999022796226, -0.06176390450408345, -0.10984037797985827, 0.06817099876989502], [5.454545454545454, 0.07083868526722366, -0.1948644913578184, -0.08576515272622494, -0.15454037763743383, 0.05744073460619067], [5.555555555555555, 0.10273774417959686, -0.16604411269293518, -0.06227643242300649, -0.11220192453549677, 0.07768889766552707], [5.656565656565657, 0.05615667848328537, -0.1379463070357274, -0.09006520587669065, -0.09690623911385629, 0.035028802046097665], [5.757575757575758, 0.05200537423557037, -0.1615593794203173, -0.08333260592101974, -0.13786289506892627, 0.050444158910044085], [5.858585858585858, 0.014525722377264051, -0.14694004229811425, -0.12095922858619654, -0.14613933108713278, 0.06743343447404773], [5.959595959595959, 0.0007667416446643042, -0.09727288523434878, -0.13816039479142794, -0.16028044258278049, 0.02449985498061063], [6.0606060606060606, -0.022388510516024418, -0.04993505563571972, -0.1332094693835155, -0.20194172730462012, 0.04039684263032578], [6.161616161616162, 0.011243787138022099, -0.01088576333124991, -0.15521748382472547, -0.22587584713247355, 0.05502673593348726], [6.262626262626262, -0.025708464385701957, 0.027464351058917272, -0.1530850667791455, -0.26506591174407906, 0.06900964326061247], [6.363636363636363, -0.04301114420678423, 0.0056196948845186785, -0.1781928634936073, -0.2799665291363309, 0.046481319198853344], [6.4646464646464645, -0.07987716290338379, -0.03144260603355538, -0.15360640906726714, -0.313363147885466, 0.05931366206658138], [6.565656565656566, -0.12367414593811282, 0.017531878486209573, -0.16262236253849222, -0.286927873574305, 0.07233314430310242], [6.666666666666667, -0.1346361670146069, -0.0122592649359901, -0.20439781454139538, -0.29886694129080504, 0.057927317880143464], [6.767676767676767, -0.15284197450901083, -0.04132919358881457, -0.21173216749526588, -0.3236465345697463, 0.05863829869307608], [6.8686868686868685, -0.14240906446507212, -0.036606998645614605, -0.19719425280043504, -0.3171409145028883, 0.021875799285490154], [6.96969696969697, -0.15462420611993352, 0.0011293379950571489, -0.16195039732144922, -0.28266093041776913, 0.06515832463998693], [7.070707070707071, -0.1250922495676411, -0.010988511163410705, -0.19633706126585998, -0.24850771562471413, 0.08645249913799335], [7.171717171717171, -0.15136445949545468, -0.03531701387661433, -0.14920682166138488, -0.23990958238964882, 0.06782842045464103], [7.2727272727272725, -0.14205957030092436, -0.007655659283928903, -0.18237885410412422, -0.20971341911884978, 0.10892320081021346], [7.373737373737374, -0.1721416744460578, -0.05111453999018739, -0.20426883072765523, -0.18358327779636907, 0.06792152665585563], [7.474747474747475, -0.2218097758837922, -0.044096245785413636, -0.2219575690296747, -0.19141175988183412, 0.09954804035632323], [7.575757575757575, -0.23265914288125764, -0.02632948194696292, -0.20988485727531828, -0.1592423129435402, 0.05136044128476062], [7.6767676767676765, -0.2565316189243512, -0.010274485734792838, -0.18395851577034772, -0.20168704523076164, 0.06606988270486432], [7.777777777777778, -0.27783076023955605, 0.034563911243118, -0.13997269825387224, -0.2298317349644965, 0.09991492952101569], [7.878787878787879, -0.3134668205225617, 0.03521231906871202, -0.18448186638239794, -0.2668053558003047, 0.14251333494761767], [7.979797979797979, -0.2882661599137525, 0.06689087444583554, -0.22134933991817973, -0.22514929634048433, 0.15376783098098312], [8.080808080808081, -0.3376849785553051, 0.016916558261959883, -0.21354234236889702, -0.20558209971050279, 0.16981134252953167], [8.181818181818182, -0.3403786178697229, 0.05166675961242746, -0.18599732578878247, -0.2054320942584555, 0.2102732760281601], [8.282828282828282, -0.3230259118826175, 0.07769342317826529, -0.20648564133170988, -0.23523918426020357, 0.1616963442606368], [8.383838383838384, -0.36998755156196483, 0.05561867927401999, -0.16723479326882848, -0.23745237297507002, 0.20316062847217617], [8.484848484848484, -0.32748751918841135, 0.043882435179215064, -0.1268568985290304, -0.2582544461312214, 0.22507252690686477], [8.585858585858587, -0.3042364883535701, 0.030470008699539298, -0.10311419941030328, -0.23600126254568818, 0.26936014821842], [8.686868686868687, -0.3389099409447155, -0.0035430130685213702, -0.11168896183383908, -0.21515157012283648, 0.3136796442238656], [8.787878787878787, -0.3112800072420126, -0.016065899932052763, -0.15447550012376543, -0.1936823090371777, 0.33761369300920147], [8.88888888888889, -0.3593318813084772, -0.010455357888424655, -0.1610080881851378, -0.22478949826667655, 0.3565446173990269], [8.98989898989899, -0.3316441695866029, -0.011852688873317552, -0.16646374181081663, -0.21874686468543827, 0.3154829300549404], [9.09090909090909, -0.38013989290325934, -0.022163953491486844, -0.20163161384390735, -0.21974929127065557, 0.34281407497493505], [9.191919191919192, -0.4015355143061877, -0.0265666295351656, -0.21108965634205243, -0.23749604838822774, 0.2995184817401015], [9.292929292929292, -0.4486733294481581, -0.0047440619310060855, -0.19542071189667254, -0.20866106212239996, 0.2570393945538933], [9.393939393939394, -0.4742151784323627, -0.03537426078213382, -0.15392601966388186, -0.15880507890965934, 0.3059064881909542], [9.494949494949495, -0.5205593971617201, 0.0067618294175435245, -0.11729783617495673, -0.14514708812901303, 0.33593212616902746], [9.595959595959595, -0.5603541466701091, -0.04061738965619946, -0.12428097993127846, -0.18242844704679237, 0.2956653828814588], [9.696969696969697, -0.5392926418590478, -0.003154644488300988, -0.13607681782422287, -0.229207514148062, 0.2694387610263742], [9.797979797979798, -0.5380990048454889, -0.009397495221342294, -0.13343480468442767, -0.2706911728215935, 0.25519987689797813], [9.8989898989899, -0.5469952006015223, -0.040713047787403756, -0.09397602073026448, -0.25253671194397026, 0.2942483867521061], [10.0, -0.5550383091516546, -0.01532093672864926, -0.11328243663999116, -0.20258912509450824, 0.2752129537768566]]}, \"id\": \"el96414535982032\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145359820329407746187\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.39999999999999991], \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414535982096\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148304\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148880\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149328\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149776\"}], \"markers\": [], \"id\": \"el96414535010704\", \"ydomain\": [-0.60000000000000009, 0.39999999999999991], \"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\"}, {\"element_ids\": [[\"el96414535982096\"], [\"el96414536148304\"], [\"el96414536148880\"], [\"el96414536149328\"], [\"el96414536149776\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.1, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.02919656565850928, 0.03911051926247067, 0.00835909509065128, 0.011469033732397639, 0.029087837891629633], [0.10101010101010101, -0.038775556536177584, 0.0651778354259987, -0.022451977409526147, 0.002561632107320135, 0.039559828985605006], [0.20202020202020202, -0.07277297221376493, 0.08315149092835508, -0.0004037173787879364, 0.039587901112342554, 0.036085318060356156], [0.30303030303030304, -0.025995870031037108, 0.03729541769481512, 0.02827436155511527, -0.001813760108685579, 0.005042421652601516], [0.40404040404040403, 0.02244606827175981, 0.03998649234089237, 0.061399371017144135, -0.031602537478822156, 0.032937964403187636], [0.5050505050505051, 0.07070392767578772, 0.013740458051274641, 0.024752207658432543, -0.035755281869505405, 0.0292692517154724], [0.6060606060606061, 0.06476032838860192, 0.05924955751880232, 0.008273773222573652, -0.07732153944054439, -0.019700392357728296], [0.7070707070707071, 0.06951513720731109, 0.012910352092599553, -0.04119193223271102, -0.06389287542280905, 0.013993494086760302], [0.8080808080808081, 0.03142762315239095, 0.01850066824454173, -0.009896761343191895, -0.05336779407043253, -0.004188147898291455], [0.9090909090909091, 0.013256701012417958, 0.058361323814868984, -0.00477733010175565, -0.06344452465169483, 0.041636072281358086], [1.0101010101010102, -0.025298733208502747, 0.07795354043919711, -0.016815695629980244, -0.061238315867821004, 0.08235785875749348], [1.1111111111111112, 0.01973409682293438, 0.11181160061151464, -0.007561497720594557, -0.016794472654474576, 0.10882822201570283], [1.2121212121212122, -0.011540225443875327, 0.11546175825500117, -0.05262668457239648, -0.006329926797746896, 0.1185407622430597], [1.3131313131313131, -0.03471273757700345, 0.11018125192725868, -0.09737304045621478, -0.037011484221353044, 0.13175537436417387], [1.4141414141414141, -0.018743131430966144, 0.07713468685017633, -0.08861288908678436, -0.009256857977774827, 0.12704672560528277], [1.5151515151515151, -0.010144711953850407, 0.09036587341424898, -0.12565932531920257, 0.013866953842483997, 0.11790570727907541], [1.6161616161616161, -0.03693963751964583, 0.06049381395509215, -0.11634128941462497, 0.009017073925264728, 0.14721028607527775], [1.7171717171717171, -0.04268265624745282, 0.09740891970764375, -0.09488996702439978, -0.024071080708922735, 0.1756366077059724], [1.8181818181818181, -0.019991321512933556, 0.10441666479914963, -0.06375768550146858, -0.009592922579477983, 0.14885538254639485], [1.9191919191919191, -0.030879559498083277, 0.11484767772296064, -0.07055543718897432, -0.02150464147189838, 0.11623568353851896], [2.0202020202020203, -0.006247944258162209, 0.12597107764045842, -0.06386577990461301, 0.00550579793156274, 0.1132755586693512], [2.121212121212121, -0.04641874597384463, 0.0762700750455479, -0.11016425297954048, 0.054871751292690424, 0.0998359254807433], [2.2222222222222223, -0.029978047000183444, 0.06051017347463712, -0.14364208402695186, 0.074985423515452, 0.056435581957575746], [2.323232323232323, -0.009184687131261832, 0.0117091078944511, -0.13334948976391223, 0.04889148777938433, 0.04405363454576061], [2.4242424242424243, -0.023842311756506335, 0.028920600355740636, -0.11431780199142243, 0.017081621038084124, 0.004481645333335227], [2.525252525252525, -0.029667726232724685, -0.013399302360641095, -0.1393291809480322, 0.0351658794479748, 0.016802854902278418], [2.6262626262626263, -0.07116189023103124, 0.023778706031428357, -0.1307256990957252, 0.03828061769350794, -0.004332616044781003], [2.727272727272727, -0.034306488028796676, -0.00893978089273284, -0.15568693711619838, 0.05319727636799871, -0.04149176334334681], [2.8282828282828283, 0.0030858178085008264, 0.02441772920665638, -0.10714598315809404, 0.05796725299234093, -0.06119461400494833], [2.929292929292929, 0.012473495075885214, -0.020882940269173707, -0.11887439010073847, 0.04631743293965706, -0.013896209432282848], [3.0303030303030303, 0.02093299773777564, -0.049535899219983415, -0.09902077491772182, 0.04241816252497095, -0.009621456279095376], [3.131313131313131, 0.02606659411912944, -0.0051905366079272736, -0.10743493000961282, 0.03642241876882708, 0.029462197146333437], [3.2323232323232323, 0.010392321229365266, -0.039904972840206054, -0.060378683411864614, 0.043462704372728214, 0.021349689653220094], [3.3333333333333335, -0.01258562041189364, -0.01301664227466389, -0.056099906144916896, 0.08042152431649563, 0.05869347761680129], [3.4343434343434343, 0.03114120101036628, -0.048572950707986215, -0.09773716706306096, 0.12274192393900399, 0.06753913385353447], [3.5353535353535355, 0.07698421007961331, -0.0487972323253908, -0.1465535318558468, 0.12669267044937624, 0.05241498399907275], [3.6363636363636362, 0.050736776459522306, -0.06056905033313809, -0.12542475100483236, 0.0822876398286402, 0.03675129105017241], [3.7373737373737375, 0.035158426905400254, -0.08413983388947349, -0.1251142505273902, 0.08101313115451753, 0.02558734130183833], [3.8383838383838382, 0.04380174701016798, -0.12757999677615964, -0.08237005561614326, 0.05975890679993619, -0.004653381996597126], [3.9393939393939394, 0.07739033988528718, -0.11880652681265427, -0.07442813635190462, 0.013123746515780112, -0.03608972000839972], [4.040404040404041, 0.08452210009114945, -0.11506688239844737, -0.04717666598608308, -0.00916502150112707, -0.07636457398372078], [4.141414141414141, 0.12445367574889996, -0.08822067766728489, -0.09597603980593225, -0.058297842805260874, -0.05116179160233768], [4.242424242424242, 0.15955559391700183, -0.08747090095999516, -0.1448134994949512, -0.10812415355692961, -0.012120762112512347], [4.343434343434343, 0.14637168943571818, -0.10952985334762497, -0.1885587827372801, -0.08036147597264204, -0.03131217465125941], [4.444444444444445, 0.16755857554575537, -0.1343316709937456, -0.2337194077618598, -0.11355971224588507, 0.009634396324434143], [4.545454545454545, 0.13252795972283443, -0.16542307650177224, -0.22577664169176861, -0.1387211616110116, 0.05883217073400869], [4.646464646464646, 0.12464615777046958, -0.19137041755169468, -0.18122024364645567, -0.09875296782719808, 0.060780482497816785], [4.747474747474747, 0.07566957332145033, -0.17942973523116326, -0.1657738580809174, -0.09549951855095985, 0.08339455765997313], [4.848484848484849, 0.027463338814274152, -0.20125569109299346, -0.18696574371860417, -0.10554826487870561, 0.1304466478352253], [4.94949494949495, 0.04802294702571806, -0.24873626146858266, -0.15666056020173214, -0.06437065358305553, 0.10503178025389026], [5.05050505050505, 0.06369092279872554, -0.26971756483386783, -0.11114367012073903, -0.05852780026670291, 0.08608157759902604], [5.151515151515151, 0.03552270446261546, -0.2201122029789905, -0.1266474475342908, -0.03558445361333567, 0.09443944082005551], [5.252525252525253, 0.07808598604774747, -0.22011212902718677, -0.0935331951289095, -0.06427479792499445, 0.0810203132393598], [5.353535353535354, 0.04011169580699105, -0.17944999022796226, -0.06176390450408345, -0.10984037797985827, 0.06817099876989502], [5.454545454545454, 0.07083868526722366, -0.1948644913578184, -0.08576515272622494, -0.15454037763743383, 0.05744073460619067], [5.555555555555555, 0.10273774417959686, -0.16604411269293518, -0.06227643242300649, -0.11220192453549677, 0.07768889766552707], [5.656565656565657, 0.05615667848328537, -0.1379463070357274, -0.09006520587669065, -0.09690623911385629, 0.035028802046097665], [5.757575757575758, 0.05200537423557037, -0.1615593794203173, -0.08333260592101974, -0.13786289506892627, 0.050444158910044085], [5.858585858585858, 0.014525722377264051, -0.14694004229811425, -0.12095922858619654, -0.14613933108713278, 0.06743343447404773], [5.959595959595959, 0.0007667416446643042, -0.09727288523434878, -0.13816039479142794, -0.16028044258278049, 0.02449985498061063], [6.0606060606060606, -0.022388510516024418, -0.04993505563571972, -0.1332094693835155, -0.20194172730462012, 0.04039684263032578], [6.161616161616162, 0.011243787138022099, -0.01088576333124991, -0.15521748382472547, -0.22587584713247355, 0.05502673593348726], [6.262626262626262, -0.025708464385701957, 0.027464351058917272, -0.1530850667791455, -0.26506591174407906, 0.06900964326061247], [6.363636363636363, -0.04301114420678423, 0.0056196948845186785, -0.1781928634936073, -0.2799665291363309, 0.046481319198853344], [6.4646464646464645, -0.07987716290338379, -0.03144260603355538, -0.15360640906726714, -0.313363147885466, 0.05931366206658138], [6.565656565656566, -0.12367414593811282, 0.017531878486209573, -0.16262236253849222, -0.286927873574305, 0.07233314430310242], [6.666666666666667, -0.1346361670146069, -0.0122592649359901, -0.20439781454139538, -0.29886694129080504, 0.057927317880143464], [6.767676767676767, -0.15284197450901083, -0.04132919358881457, -0.21173216749526588, -0.3236465345697463, 0.05863829869307608], [6.8686868686868685, -0.14240906446507212, -0.036606998645614605, -0.19719425280043504, -0.3171409145028883, 0.021875799285490154], [6.96969696969697, -0.15462420611993352, 0.0011293379950571489, -0.16195039732144922, -0.28266093041776913, 0.06515832463998693], [7.070707070707071, -0.1250922495676411, -0.010988511163410705, -0.19633706126585998, -0.24850771562471413, 0.08645249913799335], [7.171717171717171, -0.15136445949545468, -0.03531701387661433, -0.14920682166138488, -0.23990958238964882, 0.06782842045464103], [7.2727272727272725, -0.14205957030092436, -0.007655659283928903, -0.18237885410412422, -0.20971341911884978, 0.10892320081021346], [7.373737373737374, -0.1721416744460578, -0.05111453999018739, -0.20426883072765523, -0.18358327779636907, 0.06792152665585563], [7.474747474747475, -0.2218097758837922, -0.044096245785413636, -0.2219575690296747, -0.19141175988183412, 0.09954804035632323], [7.575757575757575, -0.23265914288125764, -0.02632948194696292, -0.20988485727531828, -0.1592423129435402, 0.05136044128476062], [7.6767676767676765, -0.2565316189243512, -0.010274485734792838, -0.18395851577034772, -0.20168704523076164, 0.06606988270486432], [7.777777777777778, -0.27783076023955605, 0.034563911243118, -0.13997269825387224, -0.2298317349644965, 0.09991492952101569], [7.878787878787879, -0.3134668205225617, 0.03521231906871202, -0.18448186638239794, -0.2668053558003047, 0.14251333494761767], [7.979797979797979, -0.2882661599137525, 0.06689087444583554, -0.22134933991817973, -0.22514929634048433, 0.15376783098098312], [8.080808080808081, -0.3376849785553051, 0.016916558261959883, -0.21354234236889702, -0.20558209971050279, 0.16981134252953167], [8.181818181818182, -0.3403786178697229, 0.05166675961242746, -0.18599732578878247, -0.2054320942584555, 0.2102732760281601], [8.282828282828282, -0.3230259118826175, 0.07769342317826529, -0.20648564133170988, -0.23523918426020357, 0.1616963442606368], [8.383838383838384, -0.36998755156196483, 0.05561867927401999, -0.16723479326882848, -0.23745237297507002, 0.20316062847217617], [8.484848484848484, -0.32748751918841135, 0.043882435179215064, -0.1268568985290304, -0.2582544461312214, 0.22507252690686477], [8.585858585858587, -0.3042364883535701, 0.030470008699539298, -0.10311419941030328, -0.23600126254568818, 0.26936014821842], [8.686868686868687, -0.3389099409447155, -0.0035430130685213702, -0.11168896183383908, -0.21515157012283648, 0.3136796442238656], [8.787878787878787, -0.3112800072420126, -0.016065899932052763, -0.15447550012376543, -0.1936823090371777, 0.33761369300920147], [8.88888888888889, -0.3593318813084772, -0.010455357888424655, -0.1610080881851378, -0.22478949826667655, 0.3565446173990269], [8.98989898989899, -0.3316441695866029, -0.011852688873317552, -0.16646374181081663, -0.21874686468543827, 0.3154829300549404], [9.09090909090909, -0.38013989290325934, -0.022163953491486844, -0.20163161384390735, -0.21974929127065557, 0.34281407497493505], [9.191919191919192, -0.4015355143061877, -0.0265666295351656, -0.21108965634205243, -0.23749604838822774, 0.2995184817401015], [9.292929292929292, -0.4486733294481581, -0.0047440619310060855, -0.19542071189667254, -0.20866106212239996, 0.2570393945538933], [9.393939393939394, -0.4742151784323627, -0.03537426078213382, -0.15392601966388186, -0.15880507890965934, 0.3059064881909542], [9.494949494949495, -0.5205593971617201, 0.0067618294175435245, -0.11729783617495673, -0.14514708812901303, 0.33593212616902746], [9.595959595959595, -0.5603541466701091, -0.04061738965619946, -0.12428097993127846, -0.18242844704679237, 0.2956653828814588], [9.696969696969697, -0.5392926418590478, -0.003154644488300988, -0.13607681782422287, -0.229207514148062, 0.2694387610263742], [9.797979797979798, -0.5380990048454889, -0.009397495221342294, -0.13343480468442767, -0.2706911728215935, 0.25519987689797813], [9.8989898989899, -0.5469952006015223, -0.040713047787403756, -0.09397602073026448, -0.25253671194397026, 0.2942483867521061], [10.0, -0.5550383091516546, -0.01532093672864926, -0.11328243663999116, -0.20258912509450824, 0.2752129537768566]]}, \"id\": \"el96414535982032\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145359820329407746187\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.60000000000000009, 0.39999999999999991], \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414535982096\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148304\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536148880\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149328\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536149776\"}], \"markers\": [], \"id\": \"el96414535010704\", \"ydomain\": [-0.60000000000000009, 0.39999999999999991], \"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\"}, {\"element_ids\": [[\"el96414535982096\"], [\"el96414536148304\"], [\"el96414536148880\"], [\"el96414536149328\"], [\"el96414536149776\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.1, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.02919656565850928, 0.03911051926247067, 0.00835909509065128, 0.011469033732397639, 0.029087837891629633], [0.10101010101010101, -0.038775556536177584, 0.0651778354259987, -0.022451977409526147, 0.002561632107320135, 0.039559828985605006], [0.20202020202020202, -0.07277297221376493, 0.08315149092835508, -0.0004037173787879364, 0.039587901112342554, 0.036085318060356156], [0.30303030303030304, -0.025995870031037108, 0.03729541769481512, 0.02827436155511527, -0.001813760108685579, 0.005042421652601516], [0.40404040404040403, 0.02244606827175981, 0.03998649234089237, 0.061399371017144135, -0.031602537478822156, 0.032937964403187636], [0.5050505050505051, 0.07070392767578772, 0.013740458051274641, 0.024752207658432543, -0.035755281869505405, 0.0292692517154724], [0.6060606060606061, 0.06476032838860192, 0.05924955751880232, 0.008273773222573652, -0.07732153944054439, -0.019700392357728296], [0.7070707070707071, 0.06951513720731109, 0.012910352092599553, -0.04119193223271102, -0.06389287542280905, 0.013993494086760302], [0.8080808080808081, 0.03142762315239095, 0.01850066824454173, -0.009896761343191895, -0.05336779407043253, -0.004188147898291455], [0.9090909090909091, 0.013256701012417958, 0.058361323814868984, -0.00477733010175565, -0.06344452465169483, 0.041636072281358086], [1.0101010101010102, -0.025298733208502747, 0.07795354043919711, -0.016815695629980244, -0.061238315867821004, 0.08235785875749348], [1.1111111111111112, 0.01973409682293438, 0.11181160061151464, -0.007561497720594557, -0.016794472654474576, 0.10882822201570283], [1.2121212121212122, -0.011540225443875327, 0.11546175825500117, -0.05262668457239648, -0.006329926797746896, 0.1185407622430597], [1.3131313131313131, -0.03471273757700345, 0.11018125192725868, -0.09737304045621478, -0.037011484221353044, 0.13175537436417387], [1.4141414141414141, -0.018743131430966144, 0.07713468685017633, -0.08861288908678436, -0.009256857977774827, 0.12704672560528277], [1.5151515151515151, -0.010144711953850407, 0.09036587341424898, -0.12565932531920257, 0.013866953842483997, 0.11790570727907541], [1.6161616161616161, -0.03693963751964583, 0.06049381395509215, -0.11634128941462497, 0.009017073925264728, 0.14721028607527775], [1.7171717171717171, -0.04268265624745282, 0.09740891970764375, -0.09488996702439978, -0.024071080708922735, 0.1756366077059724], [1.8181818181818181, -0.019991321512933556, 0.10441666479914963, -0.06375768550146858, -0.009592922579477983, 0.14885538254639485], [1.9191919191919191, -0.030879559498083277, 0.11484767772296064, -0.07055543718897432, -0.02150464147189838, 0.11623568353851896], [2.0202020202020203, -0.006247944258162209, 0.12597107764045842, -0.06386577990461301, 0.00550579793156274, 0.1132755586693512], [2.121212121212121, -0.04641874597384463, 0.0762700750455479, -0.11016425297954048, 0.054871751292690424, 0.0998359254807433], [2.2222222222222223, -0.029978047000183444, 0.06051017347463712, -0.14364208402695186, 0.074985423515452, 0.056435581957575746], [2.323232323232323, -0.009184687131261832, 0.0117091078944511, -0.13334948976391223, 0.04889148777938433, 0.04405363454576061], [2.4242424242424243, -0.023842311756506335, 0.028920600355740636, -0.11431780199142243, 0.017081621038084124, 0.004481645333335227], [2.525252525252525, -0.029667726232724685, -0.013399302360641095, -0.1393291809480322, 0.0351658794479748, 0.016802854902278418], [2.6262626262626263, -0.07116189023103124, 0.023778706031428357, -0.1307256990957252, 0.03828061769350794, -0.004332616044781003], [2.727272727272727, -0.034306488028796676, -0.00893978089273284, -0.15568693711619838, 0.05319727636799871, -0.04149176334334681], [2.8282828282828283, 0.0030858178085008264, 0.02441772920665638, -0.10714598315809404, 0.05796725299234093, -0.06119461400494833], [2.929292929292929, 0.012473495075885214, -0.020882940269173707, -0.11887439010073847, 0.04631743293965706, -0.013896209432282848], [3.0303030303030303, 0.02093299773777564, -0.049535899219983415, -0.09902077491772182, 0.04241816252497095, -0.009621456279095376], [3.131313131313131, 0.02606659411912944, -0.0051905366079272736, -0.10743493000961282, 0.03642241876882708, 0.029462197146333437], [3.2323232323232323, 0.010392321229365266, -0.039904972840206054, -0.060378683411864614, 0.043462704372728214, 0.021349689653220094], [3.3333333333333335, -0.01258562041189364, -0.01301664227466389, -0.056099906144916896, 0.08042152431649563, 0.05869347761680129], [3.4343434343434343, 0.03114120101036628, -0.048572950707986215, -0.09773716706306096, 0.12274192393900399, 0.06753913385353447], [3.5353535353535355, 0.07698421007961331, -0.0487972323253908, -0.1465535318558468, 0.12669267044937624, 0.05241498399907275], [3.6363636363636362, 0.050736776459522306, -0.06056905033313809, -0.12542475100483236, 0.0822876398286402, 0.03675129105017241], [3.7373737373737375, 0.035158426905400254, -0.08413983388947349, -0.1251142505273902, 0.08101313115451753, 0.02558734130183833], [3.8383838383838382, 0.04380174701016798, -0.12757999677615964, -0.08237005561614326, 0.05975890679993619, -0.004653381996597126], [3.9393939393939394, 0.07739033988528718, -0.11880652681265427, -0.07442813635190462, 0.013123746515780112, -0.03608972000839972], [4.040404040404041, 0.08452210009114945, -0.11506688239844737, -0.04717666598608308, -0.00916502150112707, -0.07636457398372078], [4.141414141414141, 0.12445367574889996, -0.08822067766728489, -0.09597603980593225, -0.058297842805260874, -0.05116179160233768], [4.242424242424242, 0.15955559391700183, -0.08747090095999516, -0.1448134994949512, -0.10812415355692961, -0.012120762112512347], [4.343434343434343, 0.14637168943571818, -0.10952985334762497, -0.1885587827372801, -0.08036147597264204, -0.03131217465125941], [4.444444444444445, 0.16755857554575537, -0.1343316709937456, -0.2337194077618598, -0.11355971224588507, 0.009634396324434143], [4.545454545454545, 0.13252795972283443, -0.16542307650177224, -0.22577664169176861, -0.1387211616110116, 0.05883217073400869], [4.646464646464646, 0.12464615777046958, -0.19137041755169468, -0.18122024364645567, -0.09875296782719808, 0.060780482497816785], [4.747474747474747, 0.07566957332145033, -0.17942973523116326, -0.1657738580809174, -0.09549951855095985, 0.08339455765997313], [4.848484848484849, 0.027463338814274152, -0.20125569109299346, -0.18696574371860417, -0.10554826487870561, 0.1304466478352253], [4.94949494949495, 0.04802294702571806, -0.24873626146858266, -0.15666056020173214, -0.06437065358305553, 0.10503178025389026], [5.05050505050505, 0.06369092279872554, -0.26971756483386783, -0.11114367012073903, -0.05852780026670291, 0.08608157759902604], [5.151515151515151, 0.03552270446261546, -0.2201122029789905, -0.1266474475342908, -0.03558445361333567, 0.09443944082005551], [5.252525252525253, 0.07808598604774747, -0.22011212902718677, -0.0935331951289095, -0.06427479792499445, 0.0810203132393598], [5.353535353535354, 0.04011169580699105, -0.17944999022796226, -0.06176390450408345, -0.10984037797985827, 0.06817099876989502], [5.454545454545454, 0.07083868526722366, -0.1948644913578184, -0.08576515272622494, -0.15454037763743383, 0.05744073460619067], [5.555555555555555, 0.10273774417959686, -0.16604411269293518, -0.06227643242300649, -0.11220192453549677, 0.07768889766552707], [5.656565656565657, 0.05615667848328537, -0.1379463070357274, -0.09006520587669065, -0.09690623911385629, 0.035028802046097665], [5.757575757575758, 0.05200537423557037, -0.1615593794203173, -0.08333260592101974, -0.13786289506892627, 0.050444158910044085], [5.858585858585858, 0.014525722377264051, -0.14694004229811425, -0.12095922858619654, -0.14613933108713278, 0.06743343447404773], [5.959595959595959, 0.0007667416446643042, -0.09727288523434878, -0.13816039479142794, -0.16028044258278049, 0.02449985498061063], [6.0606060606060606, -0.022388510516024418, -0.04993505563571972, -0.1332094693835155, -0.20194172730462012, 0.04039684263032578], [6.161616161616162, 0.011243787138022099, -0.01088576333124991, -0.15521748382472547, -0.22587584713247355, 0.05502673593348726], [6.262626262626262, -0.025708464385701957, 0.027464351058917272, -0.1530850667791455, -0.26506591174407906, 0.06900964326061247], [6.363636363636363, -0.04301114420678423, 0.0056196948845186785, -0.1781928634936073, -0.2799665291363309, 0.046481319198853344], [6.4646464646464645, -0.07987716290338379, -0.03144260603355538, -0.15360640906726714, -0.313363147885466, 0.05931366206658138], [6.565656565656566, -0.12367414593811282, 0.017531878486209573, -0.16262236253849222, -0.286927873574305, 0.07233314430310242], [6.666666666666667, -0.1346361670146069, -0.0122592649359901, -0.20439781454139538, -0.29886694129080504, 0.057927317880143464], [6.767676767676767, -0.15284197450901083, -0.04132919358881457, -0.21173216749526588, -0.3236465345697463, 0.05863829869307608], [6.8686868686868685, -0.14240906446507212, -0.036606998645614605, -0.19719425280043504, -0.3171409145028883, 0.021875799285490154], [6.96969696969697, -0.15462420611993352, 0.0011293379950571489, -0.16195039732144922, -0.28266093041776913, 0.06515832463998693], [7.070707070707071, -0.1250922495676411, -0.010988511163410705, -0.19633706126585998, -0.24850771562471413, 0.08645249913799335], [7.171717171717171, -0.15136445949545468, -0.03531701387661433, -0.14920682166138488, -0.23990958238964882, 0.06782842045464103], [7.2727272727272725, -0.14205957030092436, -0.007655659283928903, -0.18237885410412422, -0.20971341911884978, 0.10892320081021346], [7.373737373737374, -0.1721416744460578, -0.05111453999018739, -0.20426883072765523, -0.18358327779636907, 0.06792152665585563], [7.474747474747475, -0.2218097758837922, -0.044096245785413636, -0.2219575690296747, -0.19141175988183412, 0.09954804035632323], [7.575757575757575, -0.23265914288125764, -0.02632948194696292, -0.20988485727531828, -0.1592423129435402, 0.05136044128476062], [7.6767676767676765, -0.2565316189243512, -0.010274485734792838, -0.18395851577034772, -0.20168704523076164, 0.06606988270486432], [7.777777777777778, -0.27783076023955605, 0.034563911243118, -0.13997269825387224, -0.2298317349644965, 0.09991492952101569], [7.878787878787879, -0.3134668205225617, 0.03521231906871202, -0.18448186638239794, -0.2668053558003047, 0.14251333494761767], [7.979797979797979, -0.2882661599137525, 0.06689087444583554, -0.22134933991817973, -0.22514929634048433, 0.15376783098098312], [8.080808080808081, -0.3376849785553051, 0.016916558261959883, -0.21354234236889702, -0.20558209971050279, 0.16981134252953167], [8.181818181818182, -0.3403786178697229, 0.05166675961242746, -0.18599732578878247, -0.2054320942584555, 0.2102732760281601], [8.282828282828282, -0.3230259118826175, 0.07769342317826529, -0.20648564133170988, -0.23523918426020357, 0.1616963442606368], [8.383838383838384, -0.36998755156196483, 0.05561867927401999, -0.16723479326882848, -0.23745237297507002, 0.20316062847217617], [8.484848484848484, -0.32748751918841135, 0.043882435179215064, -0.1268568985290304, -0.2582544461312214, 0.22507252690686477], [8.585858585858587, -0.3042364883535701, 0.030470008699539298, -0.10311419941030328, -0.23600126254568818, 0.26936014821842], [8.686868686868687, -0.3389099409447155, -0.0035430130685213702, -0.11168896183383908, -0.21515157012283648, 0.3136796442238656], [8.787878787878787, -0.3112800072420126, -0.016065899932052763, -0.15447550012376543, -0.1936823090371777, 0.33761369300920147], [8.88888888888889, -0.3593318813084772, -0.010455357888424655, -0.1610080881851378, -0.22478949826667655, 0.3565446173990269], [8.98989898989899, -0.3316441695866029, -0.011852688873317552, -0.16646374181081663, -0.21874686468543827, 0.3154829300549404], [9.09090909090909, -0.38013989290325934, -0.022163953491486844, -0.20163161384390735, -0.21974929127065557, 0.34281407497493505], [9.191919191919192, -0.4015355143061877, -0.0265666295351656, -0.21108965634205243, -0.23749604838822774, 0.2995184817401015], [9.292929292929292, -0.4486733294481581, -0.0047440619310060855, -0.19542071189667254, -0.20866106212239996, 0.2570393945538933], [9.393939393939394, -0.4742151784323627, -0.03537426078213382, -0.15392601966388186, -0.15880507890965934, 0.3059064881909542], [9.494949494949495, -0.5205593971617201, 0.0067618294175435245, -0.11729783617495673, -0.14514708812901303, 0.33593212616902746], [9.595959595959595, -0.5603541466701091, -0.04061738965619946, -0.12428097993127846, -0.18242844704679237, 0.2956653828814588], [9.696969696969697, -0.5392926418590478, -0.003154644488300988, -0.13607681782422287, -0.229207514148062, 0.2694387610263742], [9.797979797979798, -0.5380990048454889, -0.009397495221342294, -0.13343480468442767, -0.2706911728215935, 0.25519987689797813], [9.8989898989899, -0.5469952006015223, -0.040713047787403756, -0.09397602073026448, -0.25253671194397026, 0.2942483867521061], [10.0, -0.5550383091516546, -0.01532093672864926, -0.11328243663999116, -0.20258912509450824, 0.2752129537768566]]}, \"id\": \"el96414535982032\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 2, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10e5ddb50>" | |
] | |
} | |
], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## We can link multiple elements to a single legend item" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"N_paths = 5\n", | |
"N_steps = 100\n", | |
"\n", | |
"x1 = np.linspace(0, 10, 100)\n", | |
"y = 0.1 * (np.random.random((N_paths, N_steps)) - 0.5)\n", | |
"y1 = y.cumsum(1)\n", | |
"\n", | |
"x2 = np.linspace(0, 10, 100)\n", | |
"y = 0.1 * (np.random.random((N_paths, N_steps)) - 0.5)\n", | |
"y2 = y.cumsum(1)\n", | |
"\n", | |
"fig, ax = plt.subplots()\n", | |
"labels = [\"a\", \"b\",]\n", | |
"l1 = ax.plot(x1, y1.T, lw=4, alpha=0.1, c='b', label='a')\n", | |
"l2 = ax.plot(x2, y2.T, lw=4, alpha=0.2, c='r', label='b')\n", | |
"\n", | |
"line_collections = [l1,l2]\n", | |
"plugins.connect(fig, InteractiveLegendPlugin(line_collections, labels))\n", | |
"\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145360308002109806516\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360308002109806516\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032336\"}, {\"color\": \"#0000FF\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536437904\"}, {\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536438480\"}, {\"color\": \"#0000FF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451280\"}, {\"color\": \"#0000FF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451728\"}, {\"color\": \"#FF0000\", \"yindex\": 6, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032400\"}, {\"color\": \"#FF0000\", \"yindex\": 7, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536470736\"}, {\"color\": \"#FF0000\", \"yindex\": 8, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536341648\"}, {\"color\": \"#FF0000\", \"yindex\": 9, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536479888\"}, {\"color\": \"#FF0000\", \"yindex\": 10, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536480336\"}], \"markers\": [], \"id\": \"el96414535981392\", \"ydomain\": [-0.30000000000000004, 0.5], \"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\"}, {\"element_ids\": [[\"el96414536032336\", \"el96414536437904\", \"el96414536438480\", \"el96414536451280\", \"el96414536451728\"], [\"el96414536032400\", \"el96414536470736\", \"el96414536341648\", \"el96414536479888\", \"el96414536480336\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02216970757716106, 0.03499738478383564, -0.010443200785151097, 0.040035276809343684, 0.006173209136182545, 0.015424475153860496, 0.024401412784764598, 0.036070529470498935, -0.011041000084060872, 0.03695919516784264], [0.10101010101010101, 0.011594922821955811, -0.007556688626329501, -0.04356005352147333, 0.05026118394333054, -0.03004573653558206, -0.0020182025982725133, -0.0019856586266650995, 0.04221232064558077, -0.012917361754617707, 0.08035201775075662], [0.20202020202020202, 0.014897076338012539, 0.03747834339632501, -0.03292427663034856, 0.09596546569826667, -0.06568105889543403, -0.03233227686656775, 0.008533514407766873, 0.08901363658157985, 0.015483620968327495, 0.09673184305293506], [0.30303030303030304, 0.01810067203262118, -0.006650800721326733, 0.002910023368143423, 0.10107075256760421, -0.044484080615549884, -0.0048214338417697095, 0.04045314811382248, 0.11346485090135046, 0.05104693372634743, 0.13405480075476434], [0.40404040404040403, -0.014586885731075718, 0.025208093399842167, 0.000778998795736298, 0.13522602318953342, -0.057628859988768016, -0.02140191413539733, 0.036492120637205507, 0.09842220598347859, 0.09522789471379497, 0.10076206707508573], [0.5050505050505051, -0.012919980401808974, 0.009621933893828125, 0.016591804986189954, 0.0905707713568897, -0.08246002854580584, -0.014888531079165903, 0.059058226428387484, 0.09187246361241364, 0.05277417221804792, 0.07318852099946017], [0.6060606060606061, 0.03502134151533353, -0.03181328201016749, 0.055049631591226236, 0.11743532261900817, -0.10179773739358915, -0.0423654527843798, 0.013521686420076236, 0.05331329127005435, 0.04563371515487428, 0.11589958692009437], [0.7070707070707071, 0.07036787125644794, 0.016029258487449807, 0.010524992215953488, 0.08841889685072447, -0.08049932717646457, -0.07327982791152547, 0.03505849866700893, 0.02429918762389964, 0.06762745872695328, 0.12496620961879475], [0.8080808080808081, 0.0745902143615377, 0.030105358315124814, 0.012001740036967213, 0.08621757759128056, -0.036006623216261066, -0.056295574480362265, 0.07389709869953606, 0.026728273528801645, 0.10360382592482623, 0.13054718107674396], [0.9090909090909091, 0.03165021860023657, 0.07193835238854755, 0.05331589341299869, 0.1259222972782161, 0.008646280137749603, -0.10494464846191176, 0.06405207856721164, 0.039495966015929196, 0.1197395760091975, 0.1632990230872637], [1.0101010101010102, -0.012548741092639593, 0.04537384351048024, 0.08107563841411784, 0.14048650908792282, -0.015030141503339138, -0.12377070613705118, 0.10526318020586328, 0.026299082697624876, 0.16551196728883383, 0.13060792160452767], [1.1111111111111112, -0.052731406229749284, 0.09336250164376778, 0.03619134022402466, 0.14883631110833995, 0.008404571535585346, -0.08962047655090805, 0.11156222944932878, 0.02143160144623424, 0.11891159539459747, 0.09773782259069444], [1.2121212121212122, -0.05853218474810577, 0.0534906651340378, -0.009434854678874872, 0.12705373711914658, -0.04061218273279507, -0.08527627610257837, 0.13724113166871904, 0.005859616111244546, 0.12823070442188841, 0.0843260216496711], [1.3131313131313131, -0.029123217964879874, 0.04859792015340218, -0.028851850565406182, 0.0858768572168113, -0.07379067368821296, -0.040457483740948284, 0.11646606279237942, -0.024001881949161377, 0.10383732797008023, 0.07867216532623716], [1.4141414141414141, 0.02039370644900088, 0.04611400412954356, -0.008658881538470598, 0.11885209624639292, -0.05179010001837797, -0.0823537001592698, 0.1308584147130549, 0.011772306645057552, 0.12420042614333354, 0.0622943104002887], [1.5151515151515151, -0.012999559583268452, 0.0554640493155453, 0.018517701746843862, 0.07771280212089585, -0.032333771231139855, -0.05034933482351682, 0.14283118307019452, 0.027511901828217014, 0.13575052257005848, 0.02590001358212613], [1.6161616161616161, -0.021312566927472625, 0.059058800014217455, 0.06297895014572948, 0.05666011186534013, -0.04272349918981847, -0.02964643086019732, 0.09906282141669912, 0.015290228283205611, 0.08634620000152657, 0.022626979289301703], [1.7171717171717171, -0.02685015653634835, 0.06534105461470077, 0.051394034142541456, 0.05024829872070308, -0.03638589556856873, -0.02239406198620833, 0.0702418479184384, -0.010075501888835745, 0.046237622405268956, -0.0017578737718110318], [1.8181818181818181, -0.07263403478277415, 0.11484285580241357, 0.0063195866526413805, 0.02905999484722943, 0.012632430879654613, -0.05379626096931216, 0.024226281133602784, -0.024665501058276626, 0.0014756958598147324, -0.03780019236005365], [1.9191919191919191, -0.11155853685600287, 0.10645239040384281, 0.005412153748801547, 0.031042512146892198, 0.034900472910899365, -0.08648024479498417, 0.0001115401853886526, -0.005970339785959785, 0.004501354648955338, -0.02871306153517169], [2.0202020202020203, -0.12396008541424478, 0.1444542216749415, 0.042373270693581364, 0.017807383465159452, 0.031155507973579393, -0.13194905761967965, -0.036015762375098084, -0.04312252977629906, 0.0377543460677804, -0.0477393350319716], [2.121212121212121, -0.09623824081881845, 0.11966290651393856, 0.08205184279523843, 0.0062271577690986655, 0.047239169252322306, -0.11219989294847202, -0.044140632031731165, -0.009858952892648064, 0.07553993357285385, -0.03355237821133111], [2.2222222222222223, -0.10613496029672227, 0.15597595619465282, 0.12465482483979164, -0.010073825286571117, 0.06239414464725259, -0.07434173674367713, -0.02700231649942576, -0.007985195953904699, 0.10273458171326916, -0.08129624759838602], [2.323232323232323, -0.08375607773353262, 0.1294655520667992, 0.09068284433947138, -0.007850355451146943, 0.024495200669855707, -0.09561580984050386, 0.009348339055177301, -0.043504058779770705, 0.12259359221676619, -0.11785046686885134], [2.4242424242424243, -0.04408475325372345, 0.07958818416415506, 0.12280489593783844, -0.028733687873240713, -0.0041694362721622115, -0.11790678120211168, -0.00974180246681328, 0.005798815020699989, 0.0979105756718183, -0.0961532898783792], [2.525252525252525, -0.04386518783578605, 0.04387730532138435, 0.15998991713541838, -0.0229841012223458, 0.019445046156605635, -0.14319413277438278, 0.028250892179323358, 0.049520189391535255, 0.08243572612762334, -0.12382313283504698], [2.6262626262626263, -0.08771890803752014, 0.09059672182167972, 0.12325600323316827, -0.019159599475645196, -0.002195018145994314, -0.10842168326286411, 0.000908658057618944, 0.03629164398380938, 0.12913484929384528, -0.1353403997876349], [2.727272727272727, -0.0936056712186762, 0.05178844680564023, 0.12087432491998223, 0.012733974840820471, 0.0007228129528218902, -0.09743345199603196, -0.016797060316125607, 0.06462582568623891, 0.1203160768249542, -0.0935086357134232], [2.8282828282828283, -0.06097961446760935, 0.07191202056173786, 0.09672917875268675, -0.01528131542126834, -0.012598403682582231, -0.0945361827230607, 0.03280416342022517, 0.08656024151845124, 0.11364827019098173, -0.09128712941476007], [2.929292929292929, -0.06642339678514345, 0.03618970542807733, 0.047653235575294155, 0.006422202719765312, -0.033800506204779895, -0.07052036703092439, 0.04506280595412839, 0.04836796269959011, 0.15031348702176905, -0.12731206702018713], [3.0303030303030303, -0.07189781770189231, 0.02821810158119694, 0.07965644236191449, -0.0029691967335983473, -0.0320542720402922, -0.05493820290945686, 0.025901924862921085, 0.0835476035395622, 0.16353503085818696, -0.1657159979318477], [3.131313131313131, -0.055164778132138145, 0.012157887498329575, 0.07915455633669186, 0.025627226816200062, -0.008501656757192715, -0.0071084253092945915, 0.01938630476284599, 0.03564448432360026, 0.16144451760512632, -0.15210321624510423], [3.2323232323232323, -0.03120696852890223, 0.054555099005423296, 0.0687516769700714, 0.020808873511676203, -0.021080325588023124, -0.03731210085339945, 0.04403911374559066, 0.04077981486699202, 0.1628633735582681, -0.10844398454226503], [3.3333333333333335, -0.007414293536907118, 0.10445052902830769, 0.0841606318312304, -0.025710616892211244, 0.0253042486411563, -0.034550685280910515, -5.3541449943496355e-05, 0.08954825785136411, 0.15824958686410948, -0.06743712824884612], [3.4343434343434343, 0.03327591369529079, 0.08783364406356366, 0.03484580103130601, 0.004113814385135153, 0.04795413664732644, -0.007794980466794946, -0.016977110083993066, 0.1270459242924539, 0.1491173445165309, -0.024942318423754273], [3.5353535353535355, 0.07120948706385886, 0.08241982479164091, 0.054019972620341014, -0.035939656716214165, 0.03354166265083294, 0.016710081818011834, 0.030923990730330253, 0.10475110151578636, 0.1103942187754201, 0.008432935410283171], [3.6363636363636362, 0.09498669960705386, 0.05019230614620397, 0.09487223278600576, -0.03349533887503973, 0.0010505685050983884, -0.025592849407519193, 0.008433741977661568, 0.11955807560406799, 0.15050192266219134, -0.02395414576165361], [3.7373737373737375, 0.04773608782782237, 0.08973487134514652, 0.13795473991689067, -0.05082414863443639, 0.03138185599122257, 0.008323030909468454, -0.023986991718703655, 0.12141468950816359, 0.15478272867662876, 0.016701066435983618], [3.8383838383838382, 0.048795300385474714, 0.04784557264239627, 0.17401638264928068, -0.02836156877946751, 0.02300272693336844, 0.018923676584875038, 0.0069233491453656315, 0.1416833850607233, 0.16580281990032267, 0.04873422384287092], [3.9393939393939394, 0.06466520324052401, 0.001236013874053525, 0.21199324271915926, -0.030501342043911812, -0.019549294134883766, 0.015572513953592892, 0.004971778106767311, 0.14791109558771012, 0.17850530770546535, 0.051413636949287515], [4.040404040404041, 0.07926943868316728, -0.035566691543312996, 0.16620914003106876, -0.02709208794353108, -0.01428610983658023, 0.031900891866221345, 0.03669769694357145, 0.1245687541842781, 0.18839112234297611, 0.08009275083090506], [4.141414141414141, 0.060955450245140236, -0.05792386725148155, 0.16727199229614712, -0.07302472163907281, -0.032791960450178986, 0.037327077065157595, 0.03181931055490035, 0.0786543105782504, 0.23369706563512505, 0.12347768312091842], [4.242424242424242, 0.09106748124452613, -0.012963978362031149, 0.1488472291712147, -0.04124349014780121, -0.0025351796930323245, 0.05684576228919865, 0.07273144962275678, 0.04250783760554615, 0.21100001288223308, 0.1150825541136737], [4.343434343434343, 0.13554755210018893, -0.01591794079840947, 0.16937254235506052, -0.05029352434494934, -0.0429643688268709, 0.09967188270584701, 0.11605796978031045, 0.040602062833223596, 0.18854063527732604, 0.13159877396426178], [4.444444444444445, 0.1801895758901307, -0.04370093515251287, 0.19114184863294126, -0.0015045629414148012, -0.01972518904379827, 0.10057309888039606, 0.11003971740449366, 0.0884095633978035, 0.1987272484950812, 0.10927848356597313], [4.545454545454545, 0.14177048921937113, -0.04883881933861789, 0.17158493288635657, -0.05015784131162699, -0.041187462949404285, 0.10182202457665522, 0.09298467647160276, 0.04914810677661648, 0.2373473957131576, 0.12046589998395045], [4.646464646464646, 0.132817191271651, -0.08808702132356327, 0.13382646939316808, -0.040079290490157085, -0.01569080706778354, 0.11962460542368487, 0.08688643250601703, 0.09051902093590486, 0.25265923064916335, 0.1239263844797569], [4.747474747474747, 0.15030698222708233, -0.13187686104834287, 0.15840354626543487, -0.0003549337172023756, 0.031745082532843194, 0.0966817747160982, 0.0646643842975103, 0.1274792150896168, 0.2216761589830923, 0.07432279191374783], [4.848484848484849, 0.16882027930053892, -0.155226682676199, 0.16178947642537342, -0.006830164605137256, -0.016526540365459752, 0.06121370501534254, 0.0519814142972467, 0.15239512771249758, 0.18113117390521952, 0.03234088286145797], [4.94949494949495, 0.159977590140157, -0.15615976964282113, 0.13052073872288533, -0.011786695353608899, -0.008549861317420526, 0.0288659222297655, 0.024028263430300904, 0.14236718268895088, 0.1583752148850693, 0.0644300866363482], [5.05050505050505, 0.11053560665922516, -0.17421053655056112, 0.1318082252001503, -0.022055902991402455, -0.003588707278974223, -0.015329880278803887, 0.003180353721792574, 0.12037576547629186, 0.18859122426363123, 0.055397214508223394], [5.151515151515151, 0.07159130572947062, -0.13739757616205311, 0.1623074909499171, 0.0046054328527682445, -0.024778777445802768, -0.02400058430490031, 0.010102179832228643, 0.08192320609115027, 0.2026296075148057, 0.02167293373618058], [5.252525252525253, 0.11317644311223526, -0.10657547723226243, 0.20444358131256518, 0.02404819688263681, -0.03848011393947508, -0.07303241438024116, 0.033931273278613894, 0.11431241758164412, 0.19165506258602133, -0.015420107396255031], [5.353535353535354, 0.0833887158436424, -0.13071002941355708, 0.24790915897104243, 0.042143661924535385, -0.012154344634634148, -0.11080904155009971, 0.07395169264644741, 0.0874885943092856, 0.15777807012474684, -0.006581252790708899], [5.454545454545454, 0.09652856918421951, -0.12018821570946304, 0.20701883605133917, 0.029954120525851904, 0.03340483847076704, -0.16076965369645685, 0.11195631858120472, 0.07866700249641403, 0.11524330380898365, 0.012081300347473593], [5.555555555555555, 0.06144743102180408, -0.12026805255595444, 0.1622088313310482, 0.021316751089473833, 0.0678796244296486, -0.1701833720376447, 0.09030852326695062, 0.10338026550484247, 0.11221650323975246, 0.05943763338366986], [5.656565656565657, 0.0724903213933682, -0.16677678662625822, 0.1458467228771061, 0.02602892925396734, 0.07470206651446516, -0.168959027971106, 0.0406892402484831, 0.13594002009963757, 0.14025583633243188, 0.08134482523744754], [5.757575757575758, 0.10629133216503961, -0.2135334637092805, 0.1795058382086764, 0.05688670899083808, 0.11525433601975382, -0.1588796161672154, 0.058015353538285866, 0.17885425514411174, 0.10758781620986552, 0.10952574044555419], [5.858585858585858, 0.12731462885787093, -0.17786456995192446, 0.20334951419258857, 0.05870257428536139, 0.1639831017831594, -0.18172684785304752, 0.058763692760284536, 0.20093008036701163, 0.0656442452237525, 0.1288883336073679], [5.959595959595959, 0.15699532642962344, -0.18891544629538592, 0.24953174326637786, 0.04679299387654603, 0.21217722651879645, -0.16566671462930352, 0.06276416279509403, 0.21396011226319703, 0.01636517926681988, 0.17176026676703976], [6.0606060606060606, 0.13056825446107267, -0.14826428961478907, 0.22835154050115114, 0.06633568319905006, 0.21527482223284805, -0.11641712893320566, 0.017462134221314943, 0.24954332775426522, -0.008905896355752403, 0.1402643957732079], [6.161616161616162, 0.1431565140933745, -0.13162145280463053, 0.27409380121599886, 0.07867531473639375, 0.17698593563985693, -0.14469606027700194, 0.0397252370200533, 0.20502424578831974, -0.04845782617523709, 0.11386147606099178], [6.262626262626262, 0.17998532788982824, -0.11924468484351869, 0.2335900476895259, 0.07449137535903456, 0.20241877910135078, -0.12710101046532973, 0.040647733905624706, 0.2067016712558343, -0.05391103938387863, 0.09816954445792293], [6.363636363636363, 0.17950400620490645, -0.10081017756393798, 0.2198031998928598, 0.049482937000347595, 0.19159220619988168, -0.08265687223725998, 0.052075469941648286, 0.1571433018069474, -0.02854515616913142, 0.1143774232789629], [6.4646464646464645, 0.2016952867538998, -0.13720672785618043, 0.2458363874856931, 0.022925832938721125, 0.2033347028639972, -0.12880244017817366, 0.013078164028936683, 0.14565947794769196, -0.04617319448551743, 0.09114111088486829], [6.565656565656566, 0.21109332060752017, -0.1317671741113515, 0.27347309075760295, -0.008435793072264688, 0.23983673400021108, -0.15360089173231134, 0.054839226095546006, 0.12247167536431271, -0.057563743799991476, 0.11190388744041635], [6.666666666666667, 0.1948646333877656, -0.15090233107196302, 0.265914780565049, 0.015608672788875566, 0.25049185775314864, -0.14783400244487122, 0.012514429095717705, 0.11326491682456753, -0.029256916917350287, 0.1097659617967796], [6.767676767676767, 0.2076952753798068, -0.13348130234503786, 0.2164534439871004, -0.013831917716660702, 0.22164279773156823, -0.15389547184741953, -0.02121431448671112, 0.10696579007620877, -0.043682373796582054, 0.12370510025557428], [6.8686868686868685, 0.19238265293796664, -0.1308522518936411, 0.22801953680468787, 0.018834382632432416, 0.2557809886071272, -0.12008520810987483, -0.05267919408172612, 0.1531746764808063, -0.07788343460552163, 0.151507014156404], [6.96969696969697, 0.20145020722305346, -0.16432331373171571, 0.18290327154440741, 0.06461032648910031, 0.25016926265797573, -0.09077174513094421, -0.04330553806744975, 0.1726885569379334, -0.06670553335336427, 0.18790570581751526], [7.070707070707071, 0.17345979030447006, -0.15556901169686443, 0.1481656542063618, 0.040822988842654354, 0.2617345869666381, -0.0656918514730326, -0.030701163636719337, 0.19805815666412593, -0.06614851913144923, 0.16459100261430692], [7.171717171717171, 0.20670914493916465, -0.12085522270332075, 0.13522493240668837, 0.02401780913911754, 0.2865155825522359, -0.040861188185905215, -0.04671818691570446, 0.21365433060704994, -0.08306567117587094, 0.19214165823186083], [7.2727272727272725, 0.1578120520340389, -0.0966743945520802, 0.17698842269535614, 0.03966269638493494, 0.3162435438478297, -0.018747090741112978, -0.04873453764630949, 0.21512855202257272, -0.04916247031890849, 0.1971921142269692], [7.373737373737374, 0.19796975507055947, -0.11394523231204555, 0.22517806704649324, 0.003940331923608771, 0.3168431603333197, -0.03673027104556685, -0.0239481375309688, 0.21258261264673625, -0.0973015632834961, 0.1557612561501995], [7.474747474747475, 0.20575904594512273, -0.09525436534899831, 0.2476647174692493, -0.038362093567192744, 0.28028106052535956, -0.07027106344747973, 0.021401788646063017, 0.2142449005047558, -0.07376516993509648, 0.11856366296753709], [7.575757575757575, 0.18698552791713405, -0.12683943215392823, 0.22869487708098157, -0.04513725096610545, 0.3072926857432805, -0.04943725655983093, 0.06148296069522978, 0.21531452433723897, -0.04941953277455512, 0.15704730283534216], [7.6767676767676765, 0.19162172753343987, -0.12158204493905898, 0.20636534073474241, -0.026488668147137642, 0.3141409430186994, -0.041956136176907695, 0.09049617180509983, 0.1871010682822088, -0.009822086208851437, 0.12581755180272705], [7.777777777777778, 0.17217620949375906, -0.12108059474454448, 0.18536812615506623, -0.06442885895480328, 0.2949415071999267, -0.06344456332344556, 0.09393594384267581, 0.22166955712325823, 0.03911012061574376, 0.17278271748686616], [7.878787878787879, 0.2061883937261538, -0.15249567400919575, 0.17625994179709853, -0.11374528034657896, 0.30972738100435115, -0.10657796345743167, 0.05510531728491769, 0.24650597479977468, 0.07535396199129851, 0.20068618080826015], [7.979797979797979, 0.2372899207699316, -0.13355508680004807, 0.21071272171381364, -0.0703411462356627, 0.3349677634069368, -0.057666531922393995, 0.03015212443633587, 0.21583566421829428, 0.07700361906163143, 0.2394783706481875], [8.080808080808081, 0.19578937608446345, -0.16499997326055083, 0.2395451415847887, -0.09025244411360392, 0.36490925478898445, -0.08027427137122496, 0.0790575115704546, 0.20976662325494336, 0.06236298897148015, 0.2124726785217122], [8.181818181818182, 0.22796743002883796, -0.12090911773209055, 0.24050907443215933, -0.10962361370604173, 0.36009692515022873, -0.09186568123480153, 0.11850190616623504, 0.23990519682112163, 0.055355499214088055, 0.23110039298800522], [8.282828282828282, 0.21939322164177658, -0.1364791178285932, 0.2571505801161198, -0.06712128016191787, 0.386785208411832, -0.07325490154727454, 0.11632170703889673, 0.2765281790544463, 0.04483347923462837, 0.20626876457811233], [8.383838383838384, 0.17609167904346565, -0.18441898698540896, 0.25483956425816356, -0.0613754675242559, 0.3632841107324546, -0.07829258705075806, 0.08920866422520049, 0.26331260077729113, 0.037092739764773924, 0.24073877888209294], [8.484848484848484, 0.17687485499617353, -0.14929514777502428, 0.26987002614874334, -0.04804786971775856, 0.3996471880226857, -0.1281167738945713, 0.12473405168834989, 0.22555182361740078, 0.04504858170490102, 0.20083825923649873], [8.585858585858587, 0.1918131779519939, -0.15262826136116486, 0.2959570188809162, -0.014964120186492354, 0.44726059702231014, -0.10514471969549802, 0.11362236851089591, 0.2256051148907176, 0.025120361849916485, 0.24606281826186224], [8.686868686868687, 0.23138408356799414, -0.14886727778713188, 0.24704272274931638, -0.009014293851819184, 0.4615940773959237, -0.10849249564076045, 0.08084086619506507, 0.19716596562464273, 0.03453212690968719, 0.21765164252029726], [8.787878787878787, 0.27993768358081556, -0.10622484608157595, 0.24470505848859797, 0.018403581582641763, 0.46714013841565627, -0.11780464400769171, 0.05370793254406778, 0.16126667748781714, 0.048773376385241554, 0.20443336162755443], [8.88888888888889, 0.28143529556399155, -0.08146278209928079, 0.24515130178628283, -0.011391204731125124, 0.4572066469182732, -0.0973674401938098, 0.040710844441240054, 0.17963526557486634, 0.03324034364069457, 0.17730935312839555], [8.98989898989899, 0.30676720059104967, -0.06968452571291893, 0.2642475107136181, -0.028001143076286605, 0.47620307552695446, -0.09397347791916232, 0.04377092096479211, 0.18231035288694664, -0.012128446257893666, 0.12866063481769185], [9.09090909090909, 0.29980372740750505, -0.08679504467495898, 0.29367029389741417, 0.0100786019747806, 0.44942922613132447, -0.11991023840354534, -0.002025526798075966, 0.16805653273746268, 0.022490817928666883, 0.14797624673312865], [9.191919191919192, 0.2801400946736216, -0.09701082776222822, 0.3243048522844333, 0.03228278209613593, 0.40996482138695794, -0.12762801748930283, 0.022389294047657556, 0.1833119611361229, 0.03171930220653781, 0.16789485653623587], [9.292929292929292, 0.29221659621306617, -0.12885263395693666, 0.31840428862585984, 0.012722512090789381, 0.3739284579046828, -0.1616894565272764, 0.03224508468279563, 0.17885387174419756, 0.036268984088256837, 0.2113240086009348], [9.393939393939394, 0.33106199438536643, -0.146816141841821, 0.32426212668970966, 0.006449812454839973, 0.38245896901081833, -0.1970272865863512, 0.015747671106408612, 0.20427217483586485, -0.006312780451794023, 0.2418633310796268], [9.494949494949495, 0.31437923638506243, -0.1111900718131597, 0.35493945919624165, -0.03387126944679261, 0.4088873643923603, -0.1991968561691459, -0.00477278741083793, 0.18795575823513092, -0.011250798788087716, 0.2620030874468517], [9.595959595959595, 0.3028207258242496, -0.09368037274094214, 0.3923042143437031, 0.014709954490721808, 0.41482976825235957, -0.24853595704905163, 0.00823833505495204, 0.1581611767599212, -0.04550616729257352, 0.30389907865366683], [9.696969696969697, 0.26856376255076003, -0.0868784040652079, 0.42638350431850436, 0.044586012000994144, 0.36744536764429636, -0.2356851612485427, 0.012584824691222796, 0.15204428117642305, -0.02562602425654792, 0.27286766411716223], [9.797979797979798, 0.28977409174567664, -0.12826502034756526, 0.41880080744239256, 0.08749997703294772, 0.36024662298385346, -0.20510705406468072, -0.012822374876735598, 0.1996307784500581, -0.05645452049610772, 0.2758783730582792], [9.8989898989899, 0.26705986274165494, -0.11012257861247172, 0.414849330476535, 0.10152804514939295, 0.3105950289592493, -0.23043411022151172, -0.05062533756759832, 0.2396127914779423, -0.09014451011059535, 0.2815175822239752], [10.0, 0.3017436999542412, -0.12632665144903357, 0.4189498330928184, 0.06828688872754432, 0.2786257697173747, -0.21519028164692172, -0.04284785618644474, 0.23548351011635466, -0.10130783262377215, 0.2575219715416349]]}, \"id\": \"el96414536030800\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360308002109806516\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032336\"}, {\"color\": \"#0000FF\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536437904\"}, {\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536438480\"}, {\"color\": \"#0000FF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451280\"}, {\"color\": \"#0000FF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451728\"}, {\"color\": \"#FF0000\", \"yindex\": 6, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032400\"}, {\"color\": \"#FF0000\", \"yindex\": 7, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536470736\"}, {\"color\": \"#FF0000\", \"yindex\": 8, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536341648\"}, {\"color\": \"#FF0000\", \"yindex\": 9, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536479888\"}, {\"color\": \"#FF0000\", \"yindex\": 10, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536480336\"}], \"markers\": [], \"id\": \"el96414535981392\", \"ydomain\": [-0.30000000000000004, 0.5], \"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\"}, {\"element_ids\": [[\"el96414536032336\", \"el96414536437904\", \"el96414536438480\", \"el96414536451280\", \"el96414536451728\"], [\"el96414536032400\", \"el96414536470736\", \"el96414536341648\", \"el96414536479888\", \"el96414536480336\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02216970757716106, 0.03499738478383564, -0.010443200785151097, 0.040035276809343684, 0.006173209136182545, 0.015424475153860496, 0.024401412784764598, 0.036070529470498935, -0.011041000084060872, 0.03695919516784264], [0.10101010101010101, 0.011594922821955811, -0.007556688626329501, -0.04356005352147333, 0.05026118394333054, -0.03004573653558206, -0.0020182025982725133, -0.0019856586266650995, 0.04221232064558077, -0.012917361754617707, 0.08035201775075662], [0.20202020202020202, 0.014897076338012539, 0.03747834339632501, -0.03292427663034856, 0.09596546569826667, -0.06568105889543403, -0.03233227686656775, 0.008533514407766873, 0.08901363658157985, 0.015483620968327495, 0.09673184305293506], [0.30303030303030304, 0.01810067203262118, -0.006650800721326733, 0.002910023368143423, 0.10107075256760421, -0.044484080615549884, -0.0048214338417697095, 0.04045314811382248, 0.11346485090135046, 0.05104693372634743, 0.13405480075476434], [0.40404040404040403, -0.014586885731075718, 0.025208093399842167, 0.000778998795736298, 0.13522602318953342, -0.057628859988768016, -0.02140191413539733, 0.036492120637205507, 0.09842220598347859, 0.09522789471379497, 0.10076206707508573], [0.5050505050505051, -0.012919980401808974, 0.009621933893828125, 0.016591804986189954, 0.0905707713568897, -0.08246002854580584, -0.014888531079165903, 0.059058226428387484, 0.09187246361241364, 0.05277417221804792, 0.07318852099946017], [0.6060606060606061, 0.03502134151533353, -0.03181328201016749, 0.055049631591226236, 0.11743532261900817, -0.10179773739358915, -0.0423654527843798, 0.013521686420076236, 0.05331329127005435, 0.04563371515487428, 0.11589958692009437], [0.7070707070707071, 0.07036787125644794, 0.016029258487449807, 0.010524992215953488, 0.08841889685072447, -0.08049932717646457, -0.07327982791152547, 0.03505849866700893, 0.02429918762389964, 0.06762745872695328, 0.12496620961879475], [0.8080808080808081, 0.0745902143615377, 0.030105358315124814, 0.012001740036967213, 0.08621757759128056, -0.036006623216261066, -0.056295574480362265, 0.07389709869953606, 0.026728273528801645, 0.10360382592482623, 0.13054718107674396], [0.9090909090909091, 0.03165021860023657, 0.07193835238854755, 0.05331589341299869, 0.1259222972782161, 0.008646280137749603, -0.10494464846191176, 0.06405207856721164, 0.039495966015929196, 0.1197395760091975, 0.1632990230872637], [1.0101010101010102, -0.012548741092639593, 0.04537384351048024, 0.08107563841411784, 0.14048650908792282, -0.015030141503339138, -0.12377070613705118, 0.10526318020586328, 0.026299082697624876, 0.16551196728883383, 0.13060792160452767], [1.1111111111111112, -0.052731406229749284, 0.09336250164376778, 0.03619134022402466, 0.14883631110833995, 0.008404571535585346, -0.08962047655090805, 0.11156222944932878, 0.02143160144623424, 0.11891159539459747, 0.09773782259069444], [1.2121212121212122, -0.05853218474810577, 0.0534906651340378, -0.009434854678874872, 0.12705373711914658, -0.04061218273279507, -0.08527627610257837, 0.13724113166871904, 0.005859616111244546, 0.12823070442188841, 0.0843260216496711], [1.3131313131313131, -0.029123217964879874, 0.04859792015340218, -0.028851850565406182, 0.0858768572168113, -0.07379067368821296, -0.040457483740948284, 0.11646606279237942, -0.024001881949161377, 0.10383732797008023, 0.07867216532623716], [1.4141414141414141, 0.02039370644900088, 0.04611400412954356, -0.008658881538470598, 0.11885209624639292, -0.05179010001837797, -0.0823537001592698, 0.1308584147130549, 0.011772306645057552, 0.12420042614333354, 0.0622943104002887], [1.5151515151515151, -0.012999559583268452, 0.0554640493155453, 0.018517701746843862, 0.07771280212089585, -0.032333771231139855, -0.05034933482351682, 0.14283118307019452, 0.027511901828217014, 0.13575052257005848, 0.02590001358212613], [1.6161616161616161, -0.021312566927472625, 0.059058800014217455, 0.06297895014572948, 0.05666011186534013, -0.04272349918981847, -0.02964643086019732, 0.09906282141669912, 0.015290228283205611, 0.08634620000152657, 0.022626979289301703], [1.7171717171717171, -0.02685015653634835, 0.06534105461470077, 0.051394034142541456, 0.05024829872070308, -0.03638589556856873, -0.02239406198620833, 0.0702418479184384, -0.010075501888835745, 0.046237622405268956, -0.0017578737718110318], [1.8181818181818181, -0.07263403478277415, 0.11484285580241357, 0.0063195866526413805, 0.02905999484722943, 0.012632430879654613, -0.05379626096931216, 0.024226281133602784, -0.024665501058276626, 0.0014756958598147324, -0.03780019236005365], [1.9191919191919191, -0.11155853685600287, 0.10645239040384281, 0.005412153748801547, 0.031042512146892198, 0.034900472910899365, -0.08648024479498417, 0.0001115401853886526, -0.005970339785959785, 0.004501354648955338, -0.02871306153517169], [2.0202020202020203, -0.12396008541424478, 0.1444542216749415, 0.042373270693581364, 0.017807383465159452, 0.031155507973579393, -0.13194905761967965, -0.036015762375098084, -0.04312252977629906, 0.0377543460677804, -0.0477393350319716], [2.121212121212121, -0.09623824081881845, 0.11966290651393856, 0.08205184279523843, 0.0062271577690986655, 0.047239169252322306, -0.11219989294847202, -0.044140632031731165, -0.009858952892648064, 0.07553993357285385, -0.03355237821133111], [2.2222222222222223, -0.10613496029672227, 0.15597595619465282, 0.12465482483979164, -0.010073825286571117, 0.06239414464725259, -0.07434173674367713, -0.02700231649942576, -0.007985195953904699, 0.10273458171326916, -0.08129624759838602], [2.323232323232323, -0.08375607773353262, 0.1294655520667992, 0.09068284433947138, -0.007850355451146943, 0.024495200669855707, -0.09561580984050386, 0.009348339055177301, -0.043504058779770705, 0.12259359221676619, -0.11785046686885134], [2.4242424242424243, -0.04408475325372345, 0.07958818416415506, 0.12280489593783844, -0.028733687873240713, -0.0041694362721622115, -0.11790678120211168, -0.00974180246681328, 0.005798815020699989, 0.0979105756718183, -0.0961532898783792], [2.525252525252525, -0.04386518783578605, 0.04387730532138435, 0.15998991713541838, -0.0229841012223458, 0.019445046156605635, -0.14319413277438278, 0.028250892179323358, 0.049520189391535255, 0.08243572612762334, -0.12382313283504698], [2.6262626262626263, -0.08771890803752014, 0.09059672182167972, 0.12325600323316827, -0.019159599475645196, -0.002195018145994314, -0.10842168326286411, 0.000908658057618944, 0.03629164398380938, 0.12913484929384528, -0.1353403997876349], [2.727272727272727, -0.0936056712186762, 0.05178844680564023, 0.12087432491998223, 0.012733974840820471, 0.0007228129528218902, -0.09743345199603196, -0.016797060316125607, 0.06462582568623891, 0.1203160768249542, -0.0935086357134232], [2.8282828282828283, -0.06097961446760935, 0.07191202056173786, 0.09672917875268675, -0.01528131542126834, -0.012598403682582231, -0.0945361827230607, 0.03280416342022517, 0.08656024151845124, 0.11364827019098173, -0.09128712941476007], [2.929292929292929, -0.06642339678514345, 0.03618970542807733, 0.047653235575294155, 0.006422202719765312, -0.033800506204779895, -0.07052036703092439, 0.04506280595412839, 0.04836796269959011, 0.15031348702176905, -0.12731206702018713], [3.0303030303030303, -0.07189781770189231, 0.02821810158119694, 0.07965644236191449, -0.0029691967335983473, -0.0320542720402922, -0.05493820290945686, 0.025901924862921085, 0.0835476035395622, 0.16353503085818696, -0.1657159979318477], [3.131313131313131, -0.055164778132138145, 0.012157887498329575, 0.07915455633669186, 0.025627226816200062, -0.008501656757192715, -0.0071084253092945915, 0.01938630476284599, 0.03564448432360026, 0.16144451760512632, -0.15210321624510423], [3.2323232323232323, -0.03120696852890223, 0.054555099005423296, 0.0687516769700714, 0.020808873511676203, -0.021080325588023124, -0.03731210085339945, 0.04403911374559066, 0.04077981486699202, 0.1628633735582681, -0.10844398454226503], [3.3333333333333335, -0.007414293536907118, 0.10445052902830769, 0.0841606318312304, -0.025710616892211244, 0.0253042486411563, -0.034550685280910515, -5.3541449943496355e-05, 0.08954825785136411, 0.15824958686410948, -0.06743712824884612], [3.4343434343434343, 0.03327591369529079, 0.08783364406356366, 0.03484580103130601, 0.004113814385135153, 0.04795413664732644, -0.007794980466794946, -0.016977110083993066, 0.1270459242924539, 0.1491173445165309, -0.024942318423754273], [3.5353535353535355, 0.07120948706385886, 0.08241982479164091, 0.054019972620341014, -0.035939656716214165, 0.03354166265083294, 0.016710081818011834, 0.030923990730330253, 0.10475110151578636, 0.1103942187754201, 0.008432935410283171], [3.6363636363636362, 0.09498669960705386, 0.05019230614620397, 0.09487223278600576, -0.03349533887503973, 0.0010505685050983884, -0.025592849407519193, 0.008433741977661568, 0.11955807560406799, 0.15050192266219134, -0.02395414576165361], [3.7373737373737375, 0.04773608782782237, 0.08973487134514652, 0.13795473991689067, -0.05082414863443639, 0.03138185599122257, 0.008323030909468454, -0.023986991718703655, 0.12141468950816359, 0.15478272867662876, 0.016701066435983618], [3.8383838383838382, 0.048795300385474714, 0.04784557264239627, 0.17401638264928068, -0.02836156877946751, 0.02300272693336844, 0.018923676584875038, 0.0069233491453656315, 0.1416833850607233, 0.16580281990032267, 0.04873422384287092], [3.9393939393939394, 0.06466520324052401, 0.001236013874053525, 0.21199324271915926, -0.030501342043911812, -0.019549294134883766, 0.015572513953592892, 0.004971778106767311, 0.14791109558771012, 0.17850530770546535, 0.051413636949287515], [4.040404040404041, 0.07926943868316728, -0.035566691543312996, 0.16620914003106876, -0.02709208794353108, -0.01428610983658023, 0.031900891866221345, 0.03669769694357145, 0.1245687541842781, 0.18839112234297611, 0.08009275083090506], [4.141414141414141, 0.060955450245140236, -0.05792386725148155, 0.16727199229614712, -0.07302472163907281, -0.032791960450178986, 0.037327077065157595, 0.03181931055490035, 0.0786543105782504, 0.23369706563512505, 0.12347768312091842], [4.242424242424242, 0.09106748124452613, -0.012963978362031149, 0.1488472291712147, -0.04124349014780121, -0.0025351796930323245, 0.05684576228919865, 0.07273144962275678, 0.04250783760554615, 0.21100001288223308, 0.1150825541136737], [4.343434343434343, 0.13554755210018893, -0.01591794079840947, 0.16937254235506052, -0.05029352434494934, -0.0429643688268709, 0.09967188270584701, 0.11605796978031045, 0.040602062833223596, 0.18854063527732604, 0.13159877396426178], [4.444444444444445, 0.1801895758901307, -0.04370093515251287, 0.19114184863294126, -0.0015045629414148012, -0.01972518904379827, 0.10057309888039606, 0.11003971740449366, 0.0884095633978035, 0.1987272484950812, 0.10927848356597313], [4.545454545454545, 0.14177048921937113, -0.04883881933861789, 0.17158493288635657, -0.05015784131162699, -0.041187462949404285, 0.10182202457665522, 0.09298467647160276, 0.04914810677661648, 0.2373473957131576, 0.12046589998395045], [4.646464646464646, 0.132817191271651, -0.08808702132356327, 0.13382646939316808, -0.040079290490157085, -0.01569080706778354, 0.11962460542368487, 0.08688643250601703, 0.09051902093590486, 0.25265923064916335, 0.1239263844797569], [4.747474747474747, 0.15030698222708233, -0.13187686104834287, 0.15840354626543487, -0.0003549337172023756, 0.031745082532843194, 0.0966817747160982, 0.0646643842975103, 0.1274792150896168, 0.2216761589830923, 0.07432279191374783], [4.848484848484849, 0.16882027930053892, -0.155226682676199, 0.16178947642537342, -0.006830164605137256, -0.016526540365459752, 0.06121370501534254, 0.0519814142972467, 0.15239512771249758, 0.18113117390521952, 0.03234088286145797], [4.94949494949495, 0.159977590140157, -0.15615976964282113, 0.13052073872288533, -0.011786695353608899, -0.008549861317420526, 0.0288659222297655, 0.024028263430300904, 0.14236718268895088, 0.1583752148850693, 0.0644300866363482], [5.05050505050505, 0.11053560665922516, -0.17421053655056112, 0.1318082252001503, -0.022055902991402455, -0.003588707278974223, -0.015329880278803887, 0.003180353721792574, 0.12037576547629186, 0.18859122426363123, 0.055397214508223394], [5.151515151515151, 0.07159130572947062, -0.13739757616205311, 0.1623074909499171, 0.0046054328527682445, -0.024778777445802768, -0.02400058430490031, 0.010102179832228643, 0.08192320609115027, 0.2026296075148057, 0.02167293373618058], [5.252525252525253, 0.11317644311223526, -0.10657547723226243, 0.20444358131256518, 0.02404819688263681, -0.03848011393947508, -0.07303241438024116, 0.033931273278613894, 0.11431241758164412, 0.19165506258602133, -0.015420107396255031], [5.353535353535354, 0.0833887158436424, -0.13071002941355708, 0.24790915897104243, 0.042143661924535385, -0.012154344634634148, -0.11080904155009971, 0.07395169264644741, 0.0874885943092856, 0.15777807012474684, -0.006581252790708899], [5.454545454545454, 0.09652856918421951, -0.12018821570946304, 0.20701883605133917, 0.029954120525851904, 0.03340483847076704, -0.16076965369645685, 0.11195631858120472, 0.07866700249641403, 0.11524330380898365, 0.012081300347473593], [5.555555555555555, 0.06144743102180408, -0.12026805255595444, 0.1622088313310482, 0.021316751089473833, 0.0678796244296486, -0.1701833720376447, 0.09030852326695062, 0.10338026550484247, 0.11221650323975246, 0.05943763338366986], [5.656565656565657, 0.0724903213933682, -0.16677678662625822, 0.1458467228771061, 0.02602892925396734, 0.07470206651446516, -0.168959027971106, 0.0406892402484831, 0.13594002009963757, 0.14025583633243188, 0.08134482523744754], [5.757575757575758, 0.10629133216503961, -0.2135334637092805, 0.1795058382086764, 0.05688670899083808, 0.11525433601975382, -0.1588796161672154, 0.058015353538285866, 0.17885425514411174, 0.10758781620986552, 0.10952574044555419], [5.858585858585858, 0.12731462885787093, -0.17786456995192446, 0.20334951419258857, 0.05870257428536139, 0.1639831017831594, -0.18172684785304752, 0.058763692760284536, 0.20093008036701163, 0.0656442452237525, 0.1288883336073679], [5.959595959595959, 0.15699532642962344, -0.18891544629538592, 0.24953174326637786, 0.04679299387654603, 0.21217722651879645, -0.16566671462930352, 0.06276416279509403, 0.21396011226319703, 0.01636517926681988, 0.17176026676703976], [6.0606060606060606, 0.13056825446107267, -0.14826428961478907, 0.22835154050115114, 0.06633568319905006, 0.21527482223284805, -0.11641712893320566, 0.017462134221314943, 0.24954332775426522, -0.008905896355752403, 0.1402643957732079], [6.161616161616162, 0.1431565140933745, -0.13162145280463053, 0.27409380121599886, 0.07867531473639375, 0.17698593563985693, -0.14469606027700194, 0.0397252370200533, 0.20502424578831974, -0.04845782617523709, 0.11386147606099178], [6.262626262626262, 0.17998532788982824, -0.11924468484351869, 0.2335900476895259, 0.07449137535903456, 0.20241877910135078, -0.12710101046532973, 0.040647733905624706, 0.2067016712558343, -0.05391103938387863, 0.09816954445792293], [6.363636363636363, 0.17950400620490645, -0.10081017756393798, 0.2198031998928598, 0.049482937000347595, 0.19159220619988168, -0.08265687223725998, 0.052075469941648286, 0.1571433018069474, -0.02854515616913142, 0.1143774232789629], [6.4646464646464645, 0.2016952867538998, -0.13720672785618043, 0.2458363874856931, 0.022925832938721125, 0.2033347028639972, -0.12880244017817366, 0.013078164028936683, 0.14565947794769196, -0.04617319448551743, 0.09114111088486829], [6.565656565656566, 0.21109332060752017, -0.1317671741113515, 0.27347309075760295, -0.008435793072264688, 0.23983673400021108, -0.15360089173231134, 0.054839226095546006, 0.12247167536431271, -0.057563743799991476, 0.11190388744041635], [6.666666666666667, 0.1948646333877656, -0.15090233107196302, 0.265914780565049, 0.015608672788875566, 0.25049185775314864, -0.14783400244487122, 0.012514429095717705, 0.11326491682456753, -0.029256916917350287, 0.1097659617967796], [6.767676767676767, 0.2076952753798068, -0.13348130234503786, 0.2164534439871004, -0.013831917716660702, 0.22164279773156823, -0.15389547184741953, -0.02121431448671112, 0.10696579007620877, -0.043682373796582054, 0.12370510025557428], [6.8686868686868685, 0.19238265293796664, -0.1308522518936411, 0.22801953680468787, 0.018834382632432416, 0.2557809886071272, -0.12008520810987483, -0.05267919408172612, 0.1531746764808063, -0.07788343460552163, 0.151507014156404], [6.96969696969697, 0.20145020722305346, -0.16432331373171571, 0.18290327154440741, 0.06461032648910031, 0.25016926265797573, -0.09077174513094421, -0.04330553806744975, 0.1726885569379334, -0.06670553335336427, 0.18790570581751526], [7.070707070707071, 0.17345979030447006, -0.15556901169686443, 0.1481656542063618, 0.040822988842654354, 0.2617345869666381, -0.0656918514730326, -0.030701163636719337, 0.19805815666412593, -0.06614851913144923, 0.16459100261430692], [7.171717171717171, 0.20670914493916465, -0.12085522270332075, 0.13522493240668837, 0.02401780913911754, 0.2865155825522359, -0.040861188185905215, -0.04671818691570446, 0.21365433060704994, -0.08306567117587094, 0.19214165823186083], [7.2727272727272725, 0.1578120520340389, -0.0966743945520802, 0.17698842269535614, 0.03966269638493494, 0.3162435438478297, -0.018747090741112978, -0.04873453764630949, 0.21512855202257272, -0.04916247031890849, 0.1971921142269692], [7.373737373737374, 0.19796975507055947, -0.11394523231204555, 0.22517806704649324, 0.003940331923608771, 0.3168431603333197, -0.03673027104556685, -0.0239481375309688, 0.21258261264673625, -0.0973015632834961, 0.1557612561501995], [7.474747474747475, 0.20575904594512273, -0.09525436534899831, 0.2476647174692493, -0.038362093567192744, 0.28028106052535956, -0.07027106344747973, 0.021401788646063017, 0.2142449005047558, -0.07376516993509648, 0.11856366296753709], [7.575757575757575, 0.18698552791713405, -0.12683943215392823, 0.22869487708098157, -0.04513725096610545, 0.3072926857432805, -0.04943725655983093, 0.06148296069522978, 0.21531452433723897, -0.04941953277455512, 0.15704730283534216], [7.6767676767676765, 0.19162172753343987, -0.12158204493905898, 0.20636534073474241, -0.026488668147137642, 0.3141409430186994, -0.041956136176907695, 0.09049617180509983, 0.1871010682822088, -0.009822086208851437, 0.12581755180272705], [7.777777777777778, 0.17217620949375906, -0.12108059474454448, 0.18536812615506623, -0.06442885895480328, 0.2949415071999267, -0.06344456332344556, 0.09393594384267581, 0.22166955712325823, 0.03911012061574376, 0.17278271748686616], [7.878787878787879, 0.2061883937261538, -0.15249567400919575, 0.17625994179709853, -0.11374528034657896, 0.30972738100435115, -0.10657796345743167, 0.05510531728491769, 0.24650597479977468, 0.07535396199129851, 0.20068618080826015], [7.979797979797979, 0.2372899207699316, -0.13355508680004807, 0.21071272171381364, -0.0703411462356627, 0.3349677634069368, -0.057666531922393995, 0.03015212443633587, 0.21583566421829428, 0.07700361906163143, 0.2394783706481875], [8.080808080808081, 0.19578937608446345, -0.16499997326055083, 0.2395451415847887, -0.09025244411360392, 0.36490925478898445, -0.08027427137122496, 0.0790575115704546, 0.20976662325494336, 0.06236298897148015, 0.2124726785217122], [8.181818181818182, 0.22796743002883796, -0.12090911773209055, 0.24050907443215933, -0.10962361370604173, 0.36009692515022873, -0.09186568123480153, 0.11850190616623504, 0.23990519682112163, 0.055355499214088055, 0.23110039298800522], [8.282828282828282, 0.21939322164177658, -0.1364791178285932, 0.2571505801161198, -0.06712128016191787, 0.386785208411832, -0.07325490154727454, 0.11632170703889673, 0.2765281790544463, 0.04483347923462837, 0.20626876457811233], [8.383838383838384, 0.17609167904346565, -0.18441898698540896, 0.25483956425816356, -0.0613754675242559, 0.3632841107324546, -0.07829258705075806, 0.08920866422520049, 0.26331260077729113, 0.037092739764773924, 0.24073877888209294], [8.484848484848484, 0.17687485499617353, -0.14929514777502428, 0.26987002614874334, -0.04804786971775856, 0.3996471880226857, -0.1281167738945713, 0.12473405168834989, 0.22555182361740078, 0.04504858170490102, 0.20083825923649873], [8.585858585858587, 0.1918131779519939, -0.15262826136116486, 0.2959570188809162, -0.014964120186492354, 0.44726059702231014, -0.10514471969549802, 0.11362236851089591, 0.2256051148907176, 0.025120361849916485, 0.24606281826186224], [8.686868686868687, 0.23138408356799414, -0.14886727778713188, 0.24704272274931638, -0.009014293851819184, 0.4615940773959237, -0.10849249564076045, 0.08084086619506507, 0.19716596562464273, 0.03453212690968719, 0.21765164252029726], [8.787878787878787, 0.27993768358081556, -0.10622484608157595, 0.24470505848859797, 0.018403581582641763, 0.46714013841565627, -0.11780464400769171, 0.05370793254406778, 0.16126667748781714, 0.048773376385241554, 0.20443336162755443], [8.88888888888889, 0.28143529556399155, -0.08146278209928079, 0.24515130178628283, -0.011391204731125124, 0.4572066469182732, -0.0973674401938098, 0.040710844441240054, 0.17963526557486634, 0.03324034364069457, 0.17730935312839555], [8.98989898989899, 0.30676720059104967, -0.06968452571291893, 0.2642475107136181, -0.028001143076286605, 0.47620307552695446, -0.09397347791916232, 0.04377092096479211, 0.18231035288694664, -0.012128446257893666, 0.12866063481769185], [9.09090909090909, 0.29980372740750505, -0.08679504467495898, 0.29367029389741417, 0.0100786019747806, 0.44942922613132447, -0.11991023840354534, -0.002025526798075966, 0.16805653273746268, 0.022490817928666883, 0.14797624673312865], [9.191919191919192, 0.2801400946736216, -0.09701082776222822, 0.3243048522844333, 0.03228278209613593, 0.40996482138695794, -0.12762801748930283, 0.022389294047657556, 0.1833119611361229, 0.03171930220653781, 0.16789485653623587], [9.292929292929292, 0.29221659621306617, -0.12885263395693666, 0.31840428862585984, 0.012722512090789381, 0.3739284579046828, -0.1616894565272764, 0.03224508468279563, 0.17885387174419756, 0.036268984088256837, 0.2113240086009348], [9.393939393939394, 0.33106199438536643, -0.146816141841821, 0.32426212668970966, 0.006449812454839973, 0.38245896901081833, -0.1970272865863512, 0.015747671106408612, 0.20427217483586485, -0.006312780451794023, 0.2418633310796268], [9.494949494949495, 0.31437923638506243, -0.1111900718131597, 0.35493945919624165, -0.03387126944679261, 0.4088873643923603, -0.1991968561691459, -0.00477278741083793, 0.18795575823513092, -0.011250798788087716, 0.2620030874468517], [9.595959595959595, 0.3028207258242496, -0.09368037274094214, 0.3923042143437031, 0.014709954490721808, 0.41482976825235957, -0.24853595704905163, 0.00823833505495204, 0.1581611767599212, -0.04550616729257352, 0.30389907865366683], [9.696969696969697, 0.26856376255076003, -0.0868784040652079, 0.42638350431850436, 0.044586012000994144, 0.36744536764429636, -0.2356851612485427, 0.012584824691222796, 0.15204428117642305, -0.02562602425654792, 0.27286766411716223], [9.797979797979798, 0.28977409174567664, -0.12826502034756526, 0.41880080744239256, 0.08749997703294772, 0.36024662298385346, -0.20510705406468072, -0.012822374876735598, 0.1996307784500581, -0.05645452049610772, 0.2758783730582792], [9.8989898989899, 0.26705986274165494, -0.11012257861247172, 0.414849330476535, 0.10152804514939295, 0.3105950289592493, -0.23043411022151172, -0.05062533756759832, 0.2396127914779423, -0.09014451011059535, 0.2815175822239752], [10.0, 0.3017436999542412, -0.12632665144903357, 0.4189498330928184, 0.06828688872754432, 0.2786257697173747, -0.21519028164692172, -0.04284785618644474, 0.23548351011635466, -0.10130783262377215, 0.2575219715416349]]}, \"id\": \"el96414536030800\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360308002109806516\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032336\"}, {\"color\": \"#0000FF\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536437904\"}, {\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536438480\"}, {\"color\": \"#0000FF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451280\"}, {\"color\": \"#0000FF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536451728\"}, {\"color\": \"#FF0000\", \"yindex\": 6, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536032400\"}, {\"color\": \"#FF0000\", \"yindex\": 7, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536470736\"}, {\"color\": \"#FF0000\", \"yindex\": 8, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536341648\"}, {\"color\": \"#FF0000\", \"yindex\": 9, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536479888\"}, {\"color\": \"#FF0000\", \"yindex\": 10, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414536480336\"}], \"markers\": [], \"id\": \"el96414535981392\", \"ydomain\": [-0.30000000000000004, 0.5], \"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\"}, {\"element_ids\": [[\"el96414536032336\", \"el96414536437904\", \"el96414536438480\", \"el96414536451280\", \"el96414536451728\"], [\"el96414536032400\", \"el96414536470736\", \"el96414536341648\", \"el96414536479888\", \"el96414536480336\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02216970757716106, 0.03499738478383564, -0.010443200785151097, 0.040035276809343684, 0.006173209136182545, 0.015424475153860496, 0.024401412784764598, 0.036070529470498935, -0.011041000084060872, 0.03695919516784264], [0.10101010101010101, 0.011594922821955811, -0.007556688626329501, -0.04356005352147333, 0.05026118394333054, -0.03004573653558206, -0.0020182025982725133, -0.0019856586266650995, 0.04221232064558077, -0.012917361754617707, 0.08035201775075662], [0.20202020202020202, 0.014897076338012539, 0.03747834339632501, -0.03292427663034856, 0.09596546569826667, -0.06568105889543403, -0.03233227686656775, 0.008533514407766873, 0.08901363658157985, 0.015483620968327495, 0.09673184305293506], [0.30303030303030304, 0.01810067203262118, -0.006650800721326733, 0.002910023368143423, 0.10107075256760421, -0.044484080615549884, -0.0048214338417697095, 0.04045314811382248, 0.11346485090135046, 0.05104693372634743, 0.13405480075476434], [0.40404040404040403, -0.014586885731075718, 0.025208093399842167, 0.000778998795736298, 0.13522602318953342, -0.057628859988768016, -0.02140191413539733, 0.036492120637205507, 0.09842220598347859, 0.09522789471379497, 0.10076206707508573], [0.5050505050505051, -0.012919980401808974, 0.009621933893828125, 0.016591804986189954, 0.0905707713568897, -0.08246002854580584, -0.014888531079165903, 0.059058226428387484, 0.09187246361241364, 0.05277417221804792, 0.07318852099946017], [0.6060606060606061, 0.03502134151533353, -0.03181328201016749, 0.055049631591226236, 0.11743532261900817, -0.10179773739358915, -0.0423654527843798, 0.013521686420076236, 0.05331329127005435, 0.04563371515487428, 0.11589958692009437], [0.7070707070707071, 0.07036787125644794, 0.016029258487449807, 0.010524992215953488, 0.08841889685072447, -0.08049932717646457, -0.07327982791152547, 0.03505849866700893, 0.02429918762389964, 0.06762745872695328, 0.12496620961879475], [0.8080808080808081, 0.0745902143615377, 0.030105358315124814, 0.012001740036967213, 0.08621757759128056, -0.036006623216261066, -0.056295574480362265, 0.07389709869953606, 0.026728273528801645, 0.10360382592482623, 0.13054718107674396], [0.9090909090909091, 0.03165021860023657, 0.07193835238854755, 0.05331589341299869, 0.1259222972782161, 0.008646280137749603, -0.10494464846191176, 0.06405207856721164, 0.039495966015929196, 0.1197395760091975, 0.1632990230872637], [1.0101010101010102, -0.012548741092639593, 0.04537384351048024, 0.08107563841411784, 0.14048650908792282, -0.015030141503339138, -0.12377070613705118, 0.10526318020586328, 0.026299082697624876, 0.16551196728883383, 0.13060792160452767], [1.1111111111111112, -0.052731406229749284, 0.09336250164376778, 0.03619134022402466, 0.14883631110833995, 0.008404571535585346, -0.08962047655090805, 0.11156222944932878, 0.02143160144623424, 0.11891159539459747, 0.09773782259069444], [1.2121212121212122, -0.05853218474810577, 0.0534906651340378, -0.009434854678874872, 0.12705373711914658, -0.04061218273279507, -0.08527627610257837, 0.13724113166871904, 0.005859616111244546, 0.12823070442188841, 0.0843260216496711], [1.3131313131313131, -0.029123217964879874, 0.04859792015340218, -0.028851850565406182, 0.0858768572168113, -0.07379067368821296, -0.040457483740948284, 0.11646606279237942, -0.024001881949161377, 0.10383732797008023, 0.07867216532623716], [1.4141414141414141, 0.02039370644900088, 0.04611400412954356, -0.008658881538470598, 0.11885209624639292, -0.05179010001837797, -0.0823537001592698, 0.1308584147130549, 0.011772306645057552, 0.12420042614333354, 0.0622943104002887], [1.5151515151515151, -0.012999559583268452, 0.0554640493155453, 0.018517701746843862, 0.07771280212089585, -0.032333771231139855, -0.05034933482351682, 0.14283118307019452, 0.027511901828217014, 0.13575052257005848, 0.02590001358212613], [1.6161616161616161, -0.021312566927472625, 0.059058800014217455, 0.06297895014572948, 0.05666011186534013, -0.04272349918981847, -0.02964643086019732, 0.09906282141669912, 0.015290228283205611, 0.08634620000152657, 0.022626979289301703], [1.7171717171717171, -0.02685015653634835, 0.06534105461470077, 0.051394034142541456, 0.05024829872070308, -0.03638589556856873, -0.02239406198620833, 0.0702418479184384, -0.010075501888835745, 0.046237622405268956, -0.0017578737718110318], [1.8181818181818181, -0.07263403478277415, 0.11484285580241357, 0.0063195866526413805, 0.02905999484722943, 0.012632430879654613, -0.05379626096931216, 0.024226281133602784, -0.024665501058276626, 0.0014756958598147324, -0.03780019236005365], [1.9191919191919191, -0.11155853685600287, 0.10645239040384281, 0.005412153748801547, 0.031042512146892198, 0.034900472910899365, -0.08648024479498417, 0.0001115401853886526, -0.005970339785959785, 0.004501354648955338, -0.02871306153517169], [2.0202020202020203, -0.12396008541424478, 0.1444542216749415, 0.042373270693581364, 0.017807383465159452, 0.031155507973579393, -0.13194905761967965, -0.036015762375098084, -0.04312252977629906, 0.0377543460677804, -0.0477393350319716], [2.121212121212121, -0.09623824081881845, 0.11966290651393856, 0.08205184279523843, 0.0062271577690986655, 0.047239169252322306, -0.11219989294847202, -0.044140632031731165, -0.009858952892648064, 0.07553993357285385, -0.03355237821133111], [2.2222222222222223, -0.10613496029672227, 0.15597595619465282, 0.12465482483979164, -0.010073825286571117, 0.06239414464725259, -0.07434173674367713, -0.02700231649942576, -0.007985195953904699, 0.10273458171326916, -0.08129624759838602], [2.323232323232323, -0.08375607773353262, 0.1294655520667992, 0.09068284433947138, -0.007850355451146943, 0.024495200669855707, -0.09561580984050386, 0.009348339055177301, -0.043504058779770705, 0.12259359221676619, -0.11785046686885134], [2.4242424242424243, -0.04408475325372345, 0.07958818416415506, 0.12280489593783844, -0.028733687873240713, -0.0041694362721622115, -0.11790678120211168, -0.00974180246681328, 0.005798815020699989, 0.0979105756718183, -0.0961532898783792], [2.525252525252525, -0.04386518783578605, 0.04387730532138435, 0.15998991713541838, -0.0229841012223458, 0.019445046156605635, -0.14319413277438278, 0.028250892179323358, 0.049520189391535255, 0.08243572612762334, -0.12382313283504698], [2.6262626262626263, -0.08771890803752014, 0.09059672182167972, 0.12325600323316827, -0.019159599475645196, -0.002195018145994314, -0.10842168326286411, 0.000908658057618944, 0.03629164398380938, 0.12913484929384528, -0.1353403997876349], [2.727272727272727, -0.0936056712186762, 0.05178844680564023, 0.12087432491998223, 0.012733974840820471, 0.0007228129528218902, -0.09743345199603196, -0.016797060316125607, 0.06462582568623891, 0.1203160768249542, -0.0935086357134232], [2.8282828282828283, -0.06097961446760935, 0.07191202056173786, 0.09672917875268675, -0.01528131542126834, -0.012598403682582231, -0.0945361827230607, 0.03280416342022517, 0.08656024151845124, 0.11364827019098173, -0.09128712941476007], [2.929292929292929, -0.06642339678514345, 0.03618970542807733, 0.047653235575294155, 0.006422202719765312, -0.033800506204779895, -0.07052036703092439, 0.04506280595412839, 0.04836796269959011, 0.15031348702176905, -0.12731206702018713], [3.0303030303030303, -0.07189781770189231, 0.02821810158119694, 0.07965644236191449, -0.0029691967335983473, -0.0320542720402922, -0.05493820290945686, 0.025901924862921085, 0.0835476035395622, 0.16353503085818696, -0.1657159979318477], [3.131313131313131, -0.055164778132138145, 0.012157887498329575, 0.07915455633669186, 0.025627226816200062, -0.008501656757192715, -0.0071084253092945915, 0.01938630476284599, 0.03564448432360026, 0.16144451760512632, -0.15210321624510423], [3.2323232323232323, -0.03120696852890223, 0.054555099005423296, 0.0687516769700714, 0.020808873511676203, -0.021080325588023124, -0.03731210085339945, 0.04403911374559066, 0.04077981486699202, 0.1628633735582681, -0.10844398454226503], [3.3333333333333335, -0.007414293536907118, 0.10445052902830769, 0.0841606318312304, -0.025710616892211244, 0.0253042486411563, -0.034550685280910515, -5.3541449943496355e-05, 0.08954825785136411, 0.15824958686410948, -0.06743712824884612], [3.4343434343434343, 0.03327591369529079, 0.08783364406356366, 0.03484580103130601, 0.004113814385135153, 0.04795413664732644, -0.007794980466794946, -0.016977110083993066, 0.1270459242924539, 0.1491173445165309, -0.024942318423754273], [3.5353535353535355, 0.07120948706385886, 0.08241982479164091, 0.054019972620341014, -0.035939656716214165, 0.03354166265083294, 0.016710081818011834, 0.030923990730330253, 0.10475110151578636, 0.1103942187754201, 0.008432935410283171], [3.6363636363636362, 0.09498669960705386, 0.05019230614620397, 0.09487223278600576, -0.03349533887503973, 0.0010505685050983884, -0.025592849407519193, 0.008433741977661568, 0.11955807560406799, 0.15050192266219134, -0.02395414576165361], [3.7373737373737375, 0.04773608782782237, 0.08973487134514652, 0.13795473991689067, -0.05082414863443639, 0.03138185599122257, 0.008323030909468454, -0.023986991718703655, 0.12141468950816359, 0.15478272867662876, 0.016701066435983618], [3.8383838383838382, 0.048795300385474714, 0.04784557264239627, 0.17401638264928068, -0.02836156877946751, 0.02300272693336844, 0.018923676584875038, 0.0069233491453656315, 0.1416833850607233, 0.16580281990032267, 0.04873422384287092], [3.9393939393939394, 0.06466520324052401, 0.001236013874053525, 0.21199324271915926, -0.030501342043911812, -0.019549294134883766, 0.015572513953592892, 0.004971778106767311, 0.14791109558771012, 0.17850530770546535, 0.051413636949287515], [4.040404040404041, 0.07926943868316728, -0.035566691543312996, 0.16620914003106876, -0.02709208794353108, -0.01428610983658023, 0.031900891866221345, 0.03669769694357145, 0.1245687541842781, 0.18839112234297611, 0.08009275083090506], [4.141414141414141, 0.060955450245140236, -0.05792386725148155, 0.16727199229614712, -0.07302472163907281, -0.032791960450178986, 0.037327077065157595, 0.03181931055490035, 0.0786543105782504, 0.23369706563512505, 0.12347768312091842], [4.242424242424242, 0.09106748124452613, -0.012963978362031149, 0.1488472291712147, -0.04124349014780121, -0.0025351796930323245, 0.05684576228919865, 0.07273144962275678, 0.04250783760554615, 0.21100001288223308, 0.1150825541136737], [4.343434343434343, 0.13554755210018893, -0.01591794079840947, 0.16937254235506052, -0.05029352434494934, -0.0429643688268709, 0.09967188270584701, 0.11605796978031045, 0.040602062833223596, 0.18854063527732604, 0.13159877396426178], [4.444444444444445, 0.1801895758901307, -0.04370093515251287, 0.19114184863294126, -0.0015045629414148012, -0.01972518904379827, 0.10057309888039606, 0.11003971740449366, 0.0884095633978035, 0.1987272484950812, 0.10927848356597313], [4.545454545454545, 0.14177048921937113, -0.04883881933861789, 0.17158493288635657, -0.05015784131162699, -0.041187462949404285, 0.10182202457665522, 0.09298467647160276, 0.04914810677661648, 0.2373473957131576, 0.12046589998395045], [4.646464646464646, 0.132817191271651, -0.08808702132356327, 0.13382646939316808, -0.040079290490157085, -0.01569080706778354, 0.11962460542368487, 0.08688643250601703, 0.09051902093590486, 0.25265923064916335, 0.1239263844797569], [4.747474747474747, 0.15030698222708233, -0.13187686104834287, 0.15840354626543487, -0.0003549337172023756, 0.031745082532843194, 0.0966817747160982, 0.0646643842975103, 0.1274792150896168, 0.2216761589830923, 0.07432279191374783], [4.848484848484849, 0.16882027930053892, -0.155226682676199, 0.16178947642537342, -0.006830164605137256, -0.016526540365459752, 0.06121370501534254, 0.0519814142972467, 0.15239512771249758, 0.18113117390521952, 0.03234088286145797], [4.94949494949495, 0.159977590140157, -0.15615976964282113, 0.13052073872288533, -0.011786695353608899, -0.008549861317420526, 0.0288659222297655, 0.024028263430300904, 0.14236718268895088, 0.1583752148850693, 0.0644300866363482], [5.05050505050505, 0.11053560665922516, -0.17421053655056112, 0.1318082252001503, -0.022055902991402455, -0.003588707278974223, -0.015329880278803887, 0.003180353721792574, 0.12037576547629186, 0.18859122426363123, 0.055397214508223394], [5.151515151515151, 0.07159130572947062, -0.13739757616205311, 0.1623074909499171, 0.0046054328527682445, -0.024778777445802768, -0.02400058430490031, 0.010102179832228643, 0.08192320609115027, 0.2026296075148057, 0.02167293373618058], [5.252525252525253, 0.11317644311223526, -0.10657547723226243, 0.20444358131256518, 0.02404819688263681, -0.03848011393947508, -0.07303241438024116, 0.033931273278613894, 0.11431241758164412, 0.19165506258602133, -0.015420107396255031], [5.353535353535354, 0.0833887158436424, -0.13071002941355708, 0.24790915897104243, 0.042143661924535385, -0.012154344634634148, -0.11080904155009971, 0.07395169264644741, 0.0874885943092856, 0.15777807012474684, -0.006581252790708899], [5.454545454545454, 0.09652856918421951, -0.12018821570946304, 0.20701883605133917, 0.029954120525851904, 0.03340483847076704, -0.16076965369645685, 0.11195631858120472, 0.07866700249641403, 0.11524330380898365, 0.012081300347473593], [5.555555555555555, 0.06144743102180408, -0.12026805255595444, 0.1622088313310482, 0.021316751089473833, 0.0678796244296486, -0.1701833720376447, 0.09030852326695062, 0.10338026550484247, 0.11221650323975246, 0.05943763338366986], [5.656565656565657, 0.0724903213933682, -0.16677678662625822, 0.1458467228771061, 0.02602892925396734, 0.07470206651446516, -0.168959027971106, 0.0406892402484831, 0.13594002009963757, 0.14025583633243188, 0.08134482523744754], [5.757575757575758, 0.10629133216503961, -0.2135334637092805, 0.1795058382086764, 0.05688670899083808, 0.11525433601975382, -0.1588796161672154, 0.058015353538285866, 0.17885425514411174, 0.10758781620986552, 0.10952574044555419], [5.858585858585858, 0.12731462885787093, -0.17786456995192446, 0.20334951419258857, 0.05870257428536139, 0.1639831017831594, -0.18172684785304752, 0.058763692760284536, 0.20093008036701163, 0.0656442452237525, 0.1288883336073679], [5.959595959595959, 0.15699532642962344, -0.18891544629538592, 0.24953174326637786, 0.04679299387654603, 0.21217722651879645, -0.16566671462930352, 0.06276416279509403, 0.21396011226319703, 0.01636517926681988, 0.17176026676703976], [6.0606060606060606, 0.13056825446107267, -0.14826428961478907, 0.22835154050115114, 0.06633568319905006, 0.21527482223284805, -0.11641712893320566, 0.017462134221314943, 0.24954332775426522, -0.008905896355752403, 0.1402643957732079], [6.161616161616162, 0.1431565140933745, -0.13162145280463053, 0.27409380121599886, 0.07867531473639375, 0.17698593563985693, -0.14469606027700194, 0.0397252370200533, 0.20502424578831974, -0.04845782617523709, 0.11386147606099178], [6.262626262626262, 0.17998532788982824, -0.11924468484351869, 0.2335900476895259, 0.07449137535903456, 0.20241877910135078, -0.12710101046532973, 0.040647733905624706, 0.2067016712558343, -0.05391103938387863, 0.09816954445792293], [6.363636363636363, 0.17950400620490645, -0.10081017756393798, 0.2198031998928598, 0.049482937000347595, 0.19159220619988168, -0.08265687223725998, 0.052075469941648286, 0.1571433018069474, -0.02854515616913142, 0.1143774232789629], [6.4646464646464645, 0.2016952867538998, -0.13720672785618043, 0.2458363874856931, 0.022925832938721125, 0.2033347028639972, -0.12880244017817366, 0.013078164028936683, 0.14565947794769196, -0.04617319448551743, 0.09114111088486829], [6.565656565656566, 0.21109332060752017, -0.1317671741113515, 0.27347309075760295, -0.008435793072264688, 0.23983673400021108, -0.15360089173231134, 0.054839226095546006, 0.12247167536431271, -0.057563743799991476, 0.11190388744041635], [6.666666666666667, 0.1948646333877656, -0.15090233107196302, 0.265914780565049, 0.015608672788875566, 0.25049185775314864, -0.14783400244487122, 0.012514429095717705, 0.11326491682456753, -0.029256916917350287, 0.1097659617967796], [6.767676767676767, 0.2076952753798068, -0.13348130234503786, 0.2164534439871004, -0.013831917716660702, 0.22164279773156823, -0.15389547184741953, -0.02121431448671112, 0.10696579007620877, -0.043682373796582054, 0.12370510025557428], [6.8686868686868685, 0.19238265293796664, -0.1308522518936411, 0.22801953680468787, 0.018834382632432416, 0.2557809886071272, -0.12008520810987483, -0.05267919408172612, 0.1531746764808063, -0.07788343460552163, 0.151507014156404], [6.96969696969697, 0.20145020722305346, -0.16432331373171571, 0.18290327154440741, 0.06461032648910031, 0.25016926265797573, -0.09077174513094421, -0.04330553806744975, 0.1726885569379334, -0.06670553335336427, 0.18790570581751526], [7.070707070707071, 0.17345979030447006, -0.15556901169686443, 0.1481656542063618, 0.040822988842654354, 0.2617345869666381, -0.0656918514730326, -0.030701163636719337, 0.19805815666412593, -0.06614851913144923, 0.16459100261430692], [7.171717171717171, 0.20670914493916465, -0.12085522270332075, 0.13522493240668837, 0.02401780913911754, 0.2865155825522359, -0.040861188185905215, -0.04671818691570446, 0.21365433060704994, -0.08306567117587094, 0.19214165823186083], [7.2727272727272725, 0.1578120520340389, -0.0966743945520802, 0.17698842269535614, 0.03966269638493494, 0.3162435438478297, -0.018747090741112978, -0.04873453764630949, 0.21512855202257272, -0.04916247031890849, 0.1971921142269692], [7.373737373737374, 0.19796975507055947, -0.11394523231204555, 0.22517806704649324, 0.003940331923608771, 0.3168431603333197, -0.03673027104556685, -0.0239481375309688, 0.21258261264673625, -0.0973015632834961, 0.1557612561501995], [7.474747474747475, 0.20575904594512273, -0.09525436534899831, 0.2476647174692493, -0.038362093567192744, 0.28028106052535956, -0.07027106344747973, 0.021401788646063017, 0.2142449005047558, -0.07376516993509648, 0.11856366296753709], [7.575757575757575, 0.18698552791713405, -0.12683943215392823, 0.22869487708098157, -0.04513725096610545, 0.3072926857432805, -0.04943725655983093, 0.06148296069522978, 0.21531452433723897, -0.04941953277455512, 0.15704730283534216], [7.6767676767676765, 0.19162172753343987, -0.12158204493905898, 0.20636534073474241, -0.026488668147137642, 0.3141409430186994, -0.041956136176907695, 0.09049617180509983, 0.1871010682822088, -0.009822086208851437, 0.12581755180272705], [7.777777777777778, 0.17217620949375906, -0.12108059474454448, 0.18536812615506623, -0.06442885895480328, 0.2949415071999267, -0.06344456332344556, 0.09393594384267581, 0.22166955712325823, 0.03911012061574376, 0.17278271748686616], [7.878787878787879, 0.2061883937261538, -0.15249567400919575, 0.17625994179709853, -0.11374528034657896, 0.30972738100435115, -0.10657796345743167, 0.05510531728491769, 0.24650597479977468, 0.07535396199129851, 0.20068618080826015], [7.979797979797979, 0.2372899207699316, -0.13355508680004807, 0.21071272171381364, -0.0703411462356627, 0.3349677634069368, -0.057666531922393995, 0.03015212443633587, 0.21583566421829428, 0.07700361906163143, 0.2394783706481875], [8.080808080808081, 0.19578937608446345, -0.16499997326055083, 0.2395451415847887, -0.09025244411360392, 0.36490925478898445, -0.08027427137122496, 0.0790575115704546, 0.20976662325494336, 0.06236298897148015, 0.2124726785217122], [8.181818181818182, 0.22796743002883796, -0.12090911773209055, 0.24050907443215933, -0.10962361370604173, 0.36009692515022873, -0.09186568123480153, 0.11850190616623504, 0.23990519682112163, 0.055355499214088055, 0.23110039298800522], [8.282828282828282, 0.21939322164177658, -0.1364791178285932, 0.2571505801161198, -0.06712128016191787, 0.386785208411832, -0.07325490154727454, 0.11632170703889673, 0.2765281790544463, 0.04483347923462837, 0.20626876457811233], [8.383838383838384, 0.17609167904346565, -0.18441898698540896, 0.25483956425816356, -0.0613754675242559, 0.3632841107324546, -0.07829258705075806, 0.08920866422520049, 0.26331260077729113, 0.037092739764773924, 0.24073877888209294], [8.484848484848484, 0.17687485499617353, -0.14929514777502428, 0.26987002614874334, -0.04804786971775856, 0.3996471880226857, -0.1281167738945713, 0.12473405168834989, 0.22555182361740078, 0.04504858170490102, 0.20083825923649873], [8.585858585858587, 0.1918131779519939, -0.15262826136116486, 0.2959570188809162, -0.014964120186492354, 0.44726059702231014, -0.10514471969549802, 0.11362236851089591, 0.2256051148907176, 0.025120361849916485, 0.24606281826186224], [8.686868686868687, 0.23138408356799414, -0.14886727778713188, 0.24704272274931638, -0.009014293851819184, 0.4615940773959237, -0.10849249564076045, 0.08084086619506507, 0.19716596562464273, 0.03453212690968719, 0.21765164252029726], [8.787878787878787, 0.27993768358081556, -0.10622484608157595, 0.24470505848859797, 0.018403581582641763, 0.46714013841565627, -0.11780464400769171, 0.05370793254406778, 0.16126667748781714, 0.048773376385241554, 0.20443336162755443], [8.88888888888889, 0.28143529556399155, -0.08146278209928079, 0.24515130178628283, -0.011391204731125124, 0.4572066469182732, -0.0973674401938098, 0.040710844441240054, 0.17963526557486634, 0.03324034364069457, 0.17730935312839555], [8.98989898989899, 0.30676720059104967, -0.06968452571291893, 0.2642475107136181, -0.028001143076286605, 0.47620307552695446, -0.09397347791916232, 0.04377092096479211, 0.18231035288694664, -0.012128446257893666, 0.12866063481769185], [9.09090909090909, 0.29980372740750505, -0.08679504467495898, 0.29367029389741417, 0.0100786019747806, 0.44942922613132447, -0.11991023840354534, -0.002025526798075966, 0.16805653273746268, 0.022490817928666883, 0.14797624673312865], [9.191919191919192, 0.2801400946736216, -0.09701082776222822, 0.3243048522844333, 0.03228278209613593, 0.40996482138695794, -0.12762801748930283, 0.022389294047657556, 0.1833119611361229, 0.03171930220653781, 0.16789485653623587], [9.292929292929292, 0.29221659621306617, -0.12885263395693666, 0.31840428862585984, 0.012722512090789381, 0.3739284579046828, -0.1616894565272764, 0.03224508468279563, 0.17885387174419756, 0.036268984088256837, 0.2113240086009348], [9.393939393939394, 0.33106199438536643, -0.146816141841821, 0.32426212668970966, 0.006449812454839973, 0.38245896901081833, -0.1970272865863512, 0.015747671106408612, 0.20427217483586485, -0.006312780451794023, 0.2418633310796268], [9.494949494949495, 0.31437923638506243, -0.1111900718131597, 0.35493945919624165, -0.03387126944679261, 0.4088873643923603, -0.1991968561691459, -0.00477278741083793, 0.18795575823513092, -0.011250798788087716, 0.2620030874468517], [9.595959595959595, 0.3028207258242496, -0.09368037274094214, 0.3923042143437031, 0.014709954490721808, 0.41482976825235957, -0.24853595704905163, 0.00823833505495204, 0.1581611767599212, -0.04550616729257352, 0.30389907865366683], [9.696969696969697, 0.26856376255076003, -0.0868784040652079, 0.42638350431850436, 0.044586012000994144, 0.36744536764429636, -0.2356851612485427, 0.012584824691222796, 0.15204428117642305, -0.02562602425654792, 0.27286766411716223], [9.797979797979798, 0.28977409174567664, -0.12826502034756526, 0.41880080744239256, 0.08749997703294772, 0.36024662298385346, -0.20510705406468072, -0.012822374876735598, 0.1996307784500581, -0.05645452049610772, 0.2758783730582792], [9.8989898989899, 0.26705986274165494, -0.11012257861247172, 0.414849330476535, 0.10152804514939295, 0.3105950289592493, -0.23043411022151172, -0.05062533756759832, 0.2396127914779423, -0.09014451011059535, 0.2815175822239752], [10.0, 0.3017436999542412, -0.12632665144903357, 0.4189498330928184, 0.06828688872754432, 0.2786257697173747, -0.21519028164692172, -0.04284785618644474, 0.23548351011635466, -0.10130783262377215, 0.2575219715416349]]}, \"id\": \"el96414536030800\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 3, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10e636ad0>" | |
] | |
} | |
], | |
"prompt_number": 3 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## legends for different axes\n", | |
"\n", | |
"The optional ax argument allows creating different interactive legends for different axes" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"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", | |
"\n", | |
"fig = plt.figure()\n", | |
"ax1 = fig.add_subplot(2,1,1)\n", | |
"ax2 = fig.add_subplot(2,1,2)\n", | |
"\n", | |
"labels = [\"a\", \"b\", \"c\", \"d\", \"e\"]\n", | |
"l1 = ax1.plot(x, y.T, lw=4, alpha=0.1)\n", | |
"s1 = []\n", | |
"for i in range(N_paths):\n", | |
" s = ax2.scatter(x,y[i, :], c=next(ax2._get_lines.color_cycle), alpha=0.1)\n", | |
" s1.append(s)\n", | |
" \n", | |
"plugins.connect(fig, InteractiveLegendPlugin(l1, labels, ax=ax1))\n", | |
"plugins.connect(fig, InteractiveLegendPlugin(s1, labels, ax=ax2))\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145362084009677138615\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145362084009677138615\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.40000000000000002, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543922128\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939152\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939728\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940176\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940624\"}], \"markers\": [], \"id\": \"el96414536208656\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.40000000000000002, 0.5], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536322320\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535955536\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414543961232\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414543960528\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414543985424\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414543987024\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543922128\"], [\"el96414543939152\"], [\"el96414543939728\"], [\"el96414543940176\"], [\"el96414543940624\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536208656\", \"alpha_sel\": 1}, {\"element_ids\": [[\"el96414535955536\"], [\"el96414543961232\"], [\"el96414543960528\"], [\"el96414543985424\"], [\"el96414543987024\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536322320\", \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02840067756646486, 0.02687184131562186, 0.022309101293423096, -0.040520558753517226, 0.013635696924488405], [0.10101010101010101, 0.03179812151327309, -0.01167202467660099, 0.0632038845753653, -0.03801110506817668, 0.025285594688218716], [0.20202020202020202, 0.060312951659750966, -0.03818570179636112, 0.05584721731907224, 0.004371422071307217, -0.01036339214600741], [0.30303030303030304, 0.07620707333706012, 0.009929984657560842, 0.06712507602627146, 0.020078064069461696, -0.04026362165717029], [0.40404040404040403, 0.0990535517418711, 0.03157173654235006, 0.028414248918645905, 0.037193083547429714, -0.03570312312718482], [0.5050505050505051, 0.05385280661864318, 0.05624833210749332, 0.0381344660728319, 0.0025469630503997948, -0.04087767791858277], [0.6060606060606061, 0.006723036970534946, 0.03018626819705308, 0.03425613654347646, 0.0005110585629684778, -0.010529764386572313], [0.7070707070707071, -0.03879575385483504, -0.003248474342375896, 0.008209154877183676, -0.02804735530279913, -0.005182315328830597], [0.8080808080808081, 0.005679001197712488, -0.0397067203937853, -0.02097927042896283, -0.018471918565825085, -0.044873050830349766], [0.9090909090909091, 0.025159349352170374, 0.0015874873950228324, -0.01205556879534875, 0.00562099039062889, -0.03592727041596789], [1.0101010101010102, 0.0021059762546301736, 0.01075968418630041, -0.0302906175007722, -0.0064019157303979776, -0.021842592424396685], [1.1111111111111112, 0.02432395208736187, 0.06049234255876815, -0.06673413527308236, -0.04552162943433488, -0.012976553641802986], [1.2121212121212122, -0.018244743751200117, 0.09058286618511659, -0.03211765757102135, -0.09256371534422031, -0.03985643112998763], [1.3131313131313131, 0.007251598437850865, 0.07760050483266426, -0.07252453764858044, -0.09496092142615384, -0.021463415565339112], [1.4141414141414141, -0.01113531574836157, 0.049838886111760156, -0.06420930209726715, -0.06031728104037251, -0.024606805081254342], [1.5151515151515151, 0.03238726866316327, 0.08923508605702789, -0.050118614479306385, -0.060568279232830965, -0.0038873488242423364], [1.6161616161616161, 0.04637145012429174, 0.09503802662714676, -0.02426789269046568, -0.04896179890250946, -0.00962093178985009], [1.7171717171717171, 0.08931332456409788, 0.07086379830698775, -0.0474070520479612, -0.08894047921827114, -0.004876632439890544], [1.8181818181818181, 0.1347220467671454, 0.11217869124987193, -0.097217118480712, -0.13532985836972383, 0.013104671687611532], [1.9191919191919191, 0.13282079973324687, 0.14469540878506482, -0.05111451335425747, -0.18468455058873443, -0.004627501601718334], [2.0202020202020203, 0.08582079873408635, 0.09650719594382727, -0.022492608527452825, -0.1992153145557409, -0.04011114573454238], [2.121212121212121, 0.04900747909875284, 0.13099569218035806, -0.03542740124453446, -0.1724094354492095, 0.0052743264807799325], [2.2222222222222223, 0.07115816806337424, 0.13659642768482194, -0.060917545375678804, -0.2116674764915648, -0.006973595060531926], [2.323232323232323, 0.0893942167500038, 0.10961543631484458, -0.037522665613057546, -0.19221911275132134, 0.036275673710285596], [2.4242424242424243, 0.043421408695934596, 0.06852964083643737, 0.003074338676619187, -0.2233743469241643, 0.05815969252088248], [2.525252525252525, 0.08692706905611239, 0.04368509816894352, -0.037945126960897496, -0.19511669004712312, 0.032249116715558274], [2.6262626262626263, 0.10392659649513997, 0.02321946963798388, -0.08048774675781681, -0.1556360658351747, -0.004971816536504178], [2.727272727272727, 0.07858666760885737, 0.05516252040552457, -0.12811599104885849, -0.1452550530505478, -0.020752780132375158], [2.8282828282828283, 0.05599674153814447, 0.011678291954969215, -0.08399453683091891, -0.11333681054965275, -0.06505619943544108], [2.929292929292929, 0.10039825526979274, 0.006363980814895812, -0.10244201652907478, -0.07096247213210363, -0.0958630015963629], [3.0303030303030303, 0.14965600441834093, -0.010611565130491905, -0.09174124478695023, -0.03519429027196583, -0.09067671601085024], [3.131313131313131, 0.14405407257950437, -0.04841191762817615, -0.11651232186654428, -0.03124786801676201, -0.04651048063787737], [3.2323232323232323, 0.17974063784044, -0.059369791815287676, -0.11519104462304525, 0.001388049143582034, -0.09126077260135812], [3.3333333333333335, 0.15472376419436054, -0.04540364511358898, -0.07365176952802191, 0.046826929220601596, -0.12107404083824667], [3.4343434343434343, 0.11884724829426749, 0.004355069158369397, -0.05070946019906136, 0.09059458919605647, -0.07526283079274684], [3.5353535353535355, 0.15069597638144533, -0.03291530945310719, -0.05870705758211867, 0.04098903672764771, -0.07431987775585097], [3.6363636363636362, 0.1111845379743272, -0.0508778009083727, -0.03059078495641603, 0.08271187703453801, -0.06774019995344764], [3.7373737373737375, 0.11475125171321458, -0.09651646596997425, -0.07878164713110213, 0.10863457304535365, -0.04285264939961992], [3.8383838383838382, 0.14902201618378452, -0.04673508989439822, -0.056644786329712524, 0.070896839857118, -0.021965091105701724], [3.9393939393939394, 0.15698588673016375, -0.01223768019509406, -0.08647493695291036, 0.11364659254770781, 0.018882379900925735], [4.040404040404041, 0.15188074228844942, 0.0027574004605755206, -0.07876635506833053, 0.13749915369947716, -0.006831806478916874], [4.141414141414141, 0.10962449471570279, 0.016403278869358398, -0.11179831080680502, 0.11636211365312094, -0.04905487966186751], [4.242424242424242, 0.11985063383617332, 0.025810080377357162, -0.09783889482636969, 0.1493233306536379, -0.0930335476920073], [4.343434343434343, 0.09872727526737692, 0.05769025389277689, -0.10796351783199581, 0.1984973449092682, -0.05011477500063569], [4.444444444444445, 0.06970177920810161, 0.05842369322870431, -0.14060088952239141, 0.22819010386939323, -0.04290238844723737], [4.545454545454545, 0.08528558063626944, 0.059033774386597924, -0.11446612961423228, 0.23414790213733755, -0.06950775538131085], [4.646464646464646, 0.0929280897285879, 0.06379677274125407, -0.14575389017516194, 0.20102123343448322, -0.11244392811127144], [4.747474747474747, 0.05077013878523526, 0.029169557210963093, -0.179320109370822, 0.1604101444466472, -0.14736423067076326], [4.848484848484849, 0.06812937988834697, 0.021056191574026863, -0.16909241326719765, 0.20495117956286033, -0.17894990336992636], [4.94949494949495, 0.0394558429885684, 0.02271934825914972, -0.13711034757004126, 0.21301371352762902, -0.13253791271687876], [5.05050505050505, 0.06127098807565997, 0.035486662517369295, -0.09623822195735482, 0.2169422163532638, -0.10408193941493833], [5.151515151515151, 0.10025640578455666, -0.0005452028592127234, -0.13254395918729323, 0.19574275728464582, -0.15218706030328638], [5.252525252525253, 0.09032388672808395, -0.01224104258886638, -0.15965995492848745, 0.15209596893865215, -0.13636075761265634], [5.353535353535354, 0.09150246563073833, -0.006084119479581862, -0.1521138158543387, 0.17115625788275068, -0.13331424037008763], [5.454545454545454, 0.09850682391902282, -0.026342666315929023, -0.11210191051824575, 0.18996568574812736, -0.17529400585122318], [5.555555555555555, 0.1213745292883685, -0.012251387213793066, -0.10962991722806188, 0.14876844035026465, -0.20867769407390588], [5.656565656565657, 0.08170155777172636, -0.012757503303135312, -0.10322940803075524, 0.10158600616866414, -0.19029709944062134], [5.757575757575758, 0.061429636623974826, -0.011511151327324502, -0.10373781546624616, 0.12855143562830024, -0.1858676818983594], [5.858585858585858, 0.04545565240070268, -0.058872447930307714, -0.13180577616144995, 0.10914349271043863, -0.21635664258507403], [5.959595959595959, 0.08228003067483124, -0.01638688220357682, -0.08879974057991483, 0.10018508126058845, -0.24437257443235513], [6.0606060606060606, 0.11349545005514027, -0.05574244809046229, -0.07440706051255011, 0.09948821533420027, -0.2212391660151325], [6.161616161616162, 0.15883510559827763, -0.0360876533406988, -0.03391126664647507, 0.06617169973156725, -0.17202629723946822], [6.262626262626262, 0.1893847455166775, 0.006857011415195541, -0.029902529862871577, 0.09045508504175309, -0.199190985583555], [6.363636363636363, 0.15478971809088607, 0.03198227142707905, 0.005482749314467447, 0.12671597661073497, -0.1854810901963457], [6.4646464646464645, 0.14299128884364531, 0.0024944879843130374, 0.023726178435204002, 0.14853557725873728, -0.23392835241736976], [6.565656565656566, 0.1674975657216802, 0.018770884515803183, -0.014566019621738865, 0.1418953845377299, -0.26051809565023476], [6.666666666666667, 0.13593609371680024, -0.029163907384916348, -0.019716841689167628, 0.1257814035691863, -0.2693181804200074], [6.767676767676767, 0.18523304899975218, -0.06264056318247052, 0.01760320612293294, 0.11164197543870463, -0.27363545132785594], [6.8686868686868685, 0.2212387883636635, -0.05727990611194737, 0.05524302044326938, 0.1497878913934971, -0.24605813489979228], [6.96969696969697, 0.17994895438563963, -0.0995038361490613, 0.08490816757554658, 0.19257185520336367, -0.24507232648232305], [7.070707070707071, 0.20762169300878228, -0.10164096450943451, 0.12248804143760475, 0.19853636431865856, -0.2178717913709969], [7.171717171717171, 0.23660808124756233, -0.07757880434088146, 0.0749219461753132, 0.2256291481294228, -0.2124050244953666], [7.2727272727272725, 0.24619249664748077, -0.06611196004928217, 0.06889629775656833, 0.2550375557694349, -0.17603795142330556], [7.373737373737374, 0.27298890253504215, -0.06020429338318017, 0.035175448092644515, 0.2785182131647867, -0.1307911148320617], [7.474747474747475, 0.304935452082777, -0.03267460559776733, 0.047398346870800245, 0.27842300739020764, -0.16359629449314333], [7.575757575757575, 0.2787117425236002, -0.015786855267984096, 0.03639731406452108, 0.24186167720804352, -0.1552795401437669], [7.6767676767676765, 0.2720753356015167, -0.04623938550592864, 0.02882844937270366, 0.249456793116769, -0.16147852763394807], [7.777777777777778, 0.28103793866459786, -0.010780349475249223, 0.00037479807555165084, 0.213027401783494, -0.18958546246814575], [7.878787878787879, 0.23641260495602562, 0.024938855601484705, -0.01251823535948491, 0.22319984461526893, -0.14191697718369653], [7.979797979797979, 0.2808557671896768, 0.04817655352183901, -0.033447370258724476, 0.2528211930262095, -0.18399171925670765], [8.080808080808081, 0.2992920459026065, 0.05663795646458732, -0.05345433035723056, 0.21616112811679578, -0.15263968994209473], [8.181818181818182, 0.33723558853920915, 0.05960202999431345, -0.03568563628193862, 0.17305347242640995, -0.17340999086152495], [8.282828282828282, 0.321525123616799, 0.07442615930762796, -0.039351172120893285, 0.15660322382601563, -0.2023178003504919], [8.383838383838384, 0.2866232259291582, 0.04452839837201389, -0.04492312035821716, 0.18003517980073336, -0.21550120488314953], [8.484848484848484, 0.27269357217642604, 0.02077253708850808, -0.06348198803673893, 0.21632095959070158, -0.22087228561588626], [8.585858585858587, 0.320074154497909, 0.0654155518412849, -0.09544658048498847, 0.2229335645332259, -0.24608822416014892], [8.686868686868687, 0.3014706809242124, 0.03569679328337175, -0.09252087866431787, 0.21168422014377516, -0.2859327632057319], [8.787878787878787, 0.270177571767119, 0.005378121415455975, -0.06123135588747627, 0.2081052767292258, -0.3252175070629874], [8.88888888888889, 0.2644734737485314, -0.01704791569377051, -0.06993756572810708, 0.2530146178799046, -0.28695636861096796], [8.98989898989899, 0.27141541486080034, -0.018754664430582258, -0.047645905286918415, 0.2803411986978071, -0.26050237245803687], [9.09090909090909, 0.23310957502890545, 0.023351271333973824, -0.0534656346963832, 0.2864782651162177, -0.22288550980931254], [9.191919191919192, 0.23059293231131273, 0.05027587490705903, -0.011026913167105537, 0.3322784331362434, -0.2606669281995417], [9.292929292929292, 0.2085917232595671, 0.018874110108637612, -0.019439682933223672, 0.37720986997886374, -0.2961009541853599], [9.393939393939394, 0.1809473763813979, -0.025311241360994996, -0.019262822578902498, 0.33887023591592613, -0.2520177076385989], [9.494949494949495, 0.1342340004785835, 0.00907353090976163, -0.02011582675379024, 0.3888566770590382, -0.21631475772069653], [9.595959595959595, 0.13149140672798093, -0.036219743163325636, -0.05919527080086895, 0.43500898726806175, -0.24931550336699654], [9.696969696969697, 0.15216088634787175, -0.01813193685627843, -0.08806902835003817, 0.3960489868426003, -0.2318080442320191], [9.797979797979798, 0.12934071244081327, 0.008640194083700824, -0.11818640254272607, 0.44434472431402766, -0.24490229526610502], [9.8989898989899, 0.09303889497570944, 0.026584102557884137, -0.13229350306811974, 0.44669054331200125, -0.2427868482047157], [10.0, 0.07355646278139491, 0.006369354822276661, -0.08271934087419733, 0.43946786921906317, -0.25889188319149026]]}, \"id\": \"el96414536208400\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145362084009677138615\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.40000000000000002, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543922128\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939152\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939728\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940176\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940624\"}], \"markers\": [], \"id\": \"el96414536208656\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.40000000000000002, 0.5], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536322320\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535955536\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414543961232\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414543960528\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414543985424\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414543987024\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543922128\"], [\"el96414543939152\"], [\"el96414543939728\"], [\"el96414543940176\"], [\"el96414543940624\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536208656\", \"alpha_sel\": 1}, {\"element_ids\": [[\"el96414535955536\"], [\"el96414543961232\"], [\"el96414543960528\"], [\"el96414543985424\"], [\"el96414543987024\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536322320\", \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02840067756646486, 0.02687184131562186, 0.022309101293423096, -0.040520558753517226, 0.013635696924488405], [0.10101010101010101, 0.03179812151327309, -0.01167202467660099, 0.0632038845753653, -0.03801110506817668, 0.025285594688218716], [0.20202020202020202, 0.060312951659750966, -0.03818570179636112, 0.05584721731907224, 0.004371422071307217, -0.01036339214600741], [0.30303030303030304, 0.07620707333706012, 0.009929984657560842, 0.06712507602627146, 0.020078064069461696, -0.04026362165717029], [0.40404040404040403, 0.0990535517418711, 0.03157173654235006, 0.028414248918645905, 0.037193083547429714, -0.03570312312718482], [0.5050505050505051, 0.05385280661864318, 0.05624833210749332, 0.0381344660728319, 0.0025469630503997948, -0.04087767791858277], [0.6060606060606061, 0.006723036970534946, 0.03018626819705308, 0.03425613654347646, 0.0005110585629684778, -0.010529764386572313], [0.7070707070707071, -0.03879575385483504, -0.003248474342375896, 0.008209154877183676, -0.02804735530279913, -0.005182315328830597], [0.8080808080808081, 0.005679001197712488, -0.0397067203937853, -0.02097927042896283, -0.018471918565825085, -0.044873050830349766], [0.9090909090909091, 0.025159349352170374, 0.0015874873950228324, -0.01205556879534875, 0.00562099039062889, -0.03592727041596789], [1.0101010101010102, 0.0021059762546301736, 0.01075968418630041, -0.0302906175007722, -0.0064019157303979776, -0.021842592424396685], [1.1111111111111112, 0.02432395208736187, 0.06049234255876815, -0.06673413527308236, -0.04552162943433488, -0.012976553641802986], [1.2121212121212122, -0.018244743751200117, 0.09058286618511659, -0.03211765757102135, -0.09256371534422031, -0.03985643112998763], [1.3131313131313131, 0.007251598437850865, 0.07760050483266426, -0.07252453764858044, -0.09496092142615384, -0.021463415565339112], [1.4141414141414141, -0.01113531574836157, 0.049838886111760156, -0.06420930209726715, -0.06031728104037251, -0.024606805081254342], [1.5151515151515151, 0.03238726866316327, 0.08923508605702789, -0.050118614479306385, -0.060568279232830965, -0.0038873488242423364], [1.6161616161616161, 0.04637145012429174, 0.09503802662714676, -0.02426789269046568, -0.04896179890250946, -0.00962093178985009], [1.7171717171717171, 0.08931332456409788, 0.07086379830698775, -0.0474070520479612, -0.08894047921827114, -0.004876632439890544], [1.8181818181818181, 0.1347220467671454, 0.11217869124987193, -0.097217118480712, -0.13532985836972383, 0.013104671687611532], [1.9191919191919191, 0.13282079973324687, 0.14469540878506482, -0.05111451335425747, -0.18468455058873443, -0.004627501601718334], [2.0202020202020203, 0.08582079873408635, 0.09650719594382727, -0.022492608527452825, -0.1992153145557409, -0.04011114573454238], [2.121212121212121, 0.04900747909875284, 0.13099569218035806, -0.03542740124453446, -0.1724094354492095, 0.0052743264807799325], [2.2222222222222223, 0.07115816806337424, 0.13659642768482194, -0.060917545375678804, -0.2116674764915648, -0.006973595060531926], [2.323232323232323, 0.0893942167500038, 0.10961543631484458, -0.037522665613057546, -0.19221911275132134, 0.036275673710285596], [2.4242424242424243, 0.043421408695934596, 0.06852964083643737, 0.003074338676619187, -0.2233743469241643, 0.05815969252088248], [2.525252525252525, 0.08692706905611239, 0.04368509816894352, -0.037945126960897496, -0.19511669004712312, 0.032249116715558274], [2.6262626262626263, 0.10392659649513997, 0.02321946963798388, -0.08048774675781681, -0.1556360658351747, -0.004971816536504178], [2.727272727272727, 0.07858666760885737, 0.05516252040552457, -0.12811599104885849, -0.1452550530505478, -0.020752780132375158], [2.8282828282828283, 0.05599674153814447, 0.011678291954969215, -0.08399453683091891, -0.11333681054965275, -0.06505619943544108], [2.929292929292929, 0.10039825526979274, 0.006363980814895812, -0.10244201652907478, -0.07096247213210363, -0.0958630015963629], [3.0303030303030303, 0.14965600441834093, -0.010611565130491905, -0.09174124478695023, -0.03519429027196583, -0.09067671601085024], [3.131313131313131, 0.14405407257950437, -0.04841191762817615, -0.11651232186654428, -0.03124786801676201, -0.04651048063787737], [3.2323232323232323, 0.17974063784044, -0.059369791815287676, -0.11519104462304525, 0.001388049143582034, -0.09126077260135812], [3.3333333333333335, 0.15472376419436054, -0.04540364511358898, -0.07365176952802191, 0.046826929220601596, -0.12107404083824667], [3.4343434343434343, 0.11884724829426749, 0.004355069158369397, -0.05070946019906136, 0.09059458919605647, -0.07526283079274684], [3.5353535353535355, 0.15069597638144533, -0.03291530945310719, -0.05870705758211867, 0.04098903672764771, -0.07431987775585097], [3.6363636363636362, 0.1111845379743272, -0.0508778009083727, -0.03059078495641603, 0.08271187703453801, -0.06774019995344764], [3.7373737373737375, 0.11475125171321458, -0.09651646596997425, -0.07878164713110213, 0.10863457304535365, -0.04285264939961992], [3.8383838383838382, 0.14902201618378452, -0.04673508989439822, -0.056644786329712524, 0.070896839857118, -0.021965091105701724], [3.9393939393939394, 0.15698588673016375, -0.01223768019509406, -0.08647493695291036, 0.11364659254770781, 0.018882379900925735], [4.040404040404041, 0.15188074228844942, 0.0027574004605755206, -0.07876635506833053, 0.13749915369947716, -0.006831806478916874], [4.141414141414141, 0.10962449471570279, 0.016403278869358398, -0.11179831080680502, 0.11636211365312094, -0.04905487966186751], [4.242424242424242, 0.11985063383617332, 0.025810080377357162, -0.09783889482636969, 0.1493233306536379, -0.0930335476920073], [4.343434343434343, 0.09872727526737692, 0.05769025389277689, -0.10796351783199581, 0.1984973449092682, -0.05011477500063569], [4.444444444444445, 0.06970177920810161, 0.05842369322870431, -0.14060088952239141, 0.22819010386939323, -0.04290238844723737], [4.545454545454545, 0.08528558063626944, 0.059033774386597924, -0.11446612961423228, 0.23414790213733755, -0.06950775538131085], [4.646464646464646, 0.0929280897285879, 0.06379677274125407, -0.14575389017516194, 0.20102123343448322, -0.11244392811127144], [4.747474747474747, 0.05077013878523526, 0.029169557210963093, -0.179320109370822, 0.1604101444466472, -0.14736423067076326], [4.848484848484849, 0.06812937988834697, 0.021056191574026863, -0.16909241326719765, 0.20495117956286033, -0.17894990336992636], [4.94949494949495, 0.0394558429885684, 0.02271934825914972, -0.13711034757004126, 0.21301371352762902, -0.13253791271687876], [5.05050505050505, 0.06127098807565997, 0.035486662517369295, -0.09623822195735482, 0.2169422163532638, -0.10408193941493833], [5.151515151515151, 0.10025640578455666, -0.0005452028592127234, -0.13254395918729323, 0.19574275728464582, -0.15218706030328638], [5.252525252525253, 0.09032388672808395, -0.01224104258886638, -0.15965995492848745, 0.15209596893865215, -0.13636075761265634], [5.353535353535354, 0.09150246563073833, -0.006084119479581862, -0.1521138158543387, 0.17115625788275068, -0.13331424037008763], [5.454545454545454, 0.09850682391902282, -0.026342666315929023, -0.11210191051824575, 0.18996568574812736, -0.17529400585122318], [5.555555555555555, 0.1213745292883685, -0.012251387213793066, -0.10962991722806188, 0.14876844035026465, -0.20867769407390588], [5.656565656565657, 0.08170155777172636, -0.012757503303135312, -0.10322940803075524, 0.10158600616866414, -0.19029709944062134], [5.757575757575758, 0.061429636623974826, -0.011511151327324502, -0.10373781546624616, 0.12855143562830024, -0.1858676818983594], [5.858585858585858, 0.04545565240070268, -0.058872447930307714, -0.13180577616144995, 0.10914349271043863, -0.21635664258507403], [5.959595959595959, 0.08228003067483124, -0.01638688220357682, -0.08879974057991483, 0.10018508126058845, -0.24437257443235513], [6.0606060606060606, 0.11349545005514027, -0.05574244809046229, -0.07440706051255011, 0.09948821533420027, -0.2212391660151325], [6.161616161616162, 0.15883510559827763, -0.0360876533406988, -0.03391126664647507, 0.06617169973156725, -0.17202629723946822], [6.262626262626262, 0.1893847455166775, 0.006857011415195541, -0.029902529862871577, 0.09045508504175309, -0.199190985583555], [6.363636363636363, 0.15478971809088607, 0.03198227142707905, 0.005482749314467447, 0.12671597661073497, -0.1854810901963457], [6.4646464646464645, 0.14299128884364531, 0.0024944879843130374, 0.023726178435204002, 0.14853557725873728, -0.23392835241736976], [6.565656565656566, 0.1674975657216802, 0.018770884515803183, -0.014566019621738865, 0.1418953845377299, -0.26051809565023476], [6.666666666666667, 0.13593609371680024, -0.029163907384916348, -0.019716841689167628, 0.1257814035691863, -0.2693181804200074], [6.767676767676767, 0.18523304899975218, -0.06264056318247052, 0.01760320612293294, 0.11164197543870463, -0.27363545132785594], [6.8686868686868685, 0.2212387883636635, -0.05727990611194737, 0.05524302044326938, 0.1497878913934971, -0.24605813489979228], [6.96969696969697, 0.17994895438563963, -0.0995038361490613, 0.08490816757554658, 0.19257185520336367, -0.24507232648232305], [7.070707070707071, 0.20762169300878228, -0.10164096450943451, 0.12248804143760475, 0.19853636431865856, -0.2178717913709969], [7.171717171717171, 0.23660808124756233, -0.07757880434088146, 0.0749219461753132, 0.2256291481294228, -0.2124050244953666], [7.2727272727272725, 0.24619249664748077, -0.06611196004928217, 0.06889629775656833, 0.2550375557694349, -0.17603795142330556], [7.373737373737374, 0.27298890253504215, -0.06020429338318017, 0.035175448092644515, 0.2785182131647867, -0.1307911148320617], [7.474747474747475, 0.304935452082777, -0.03267460559776733, 0.047398346870800245, 0.27842300739020764, -0.16359629449314333], [7.575757575757575, 0.2787117425236002, -0.015786855267984096, 0.03639731406452108, 0.24186167720804352, -0.1552795401437669], [7.6767676767676765, 0.2720753356015167, -0.04623938550592864, 0.02882844937270366, 0.249456793116769, -0.16147852763394807], [7.777777777777778, 0.28103793866459786, -0.010780349475249223, 0.00037479807555165084, 0.213027401783494, -0.18958546246814575], [7.878787878787879, 0.23641260495602562, 0.024938855601484705, -0.01251823535948491, 0.22319984461526893, -0.14191697718369653], [7.979797979797979, 0.2808557671896768, 0.04817655352183901, -0.033447370258724476, 0.2528211930262095, -0.18399171925670765], [8.080808080808081, 0.2992920459026065, 0.05663795646458732, -0.05345433035723056, 0.21616112811679578, -0.15263968994209473], [8.181818181818182, 0.33723558853920915, 0.05960202999431345, -0.03568563628193862, 0.17305347242640995, -0.17340999086152495], [8.282828282828282, 0.321525123616799, 0.07442615930762796, -0.039351172120893285, 0.15660322382601563, -0.2023178003504919], [8.383838383838384, 0.2866232259291582, 0.04452839837201389, -0.04492312035821716, 0.18003517980073336, -0.21550120488314953], [8.484848484848484, 0.27269357217642604, 0.02077253708850808, -0.06348198803673893, 0.21632095959070158, -0.22087228561588626], [8.585858585858587, 0.320074154497909, 0.0654155518412849, -0.09544658048498847, 0.2229335645332259, -0.24608822416014892], [8.686868686868687, 0.3014706809242124, 0.03569679328337175, -0.09252087866431787, 0.21168422014377516, -0.2859327632057319], [8.787878787878787, 0.270177571767119, 0.005378121415455975, -0.06123135588747627, 0.2081052767292258, -0.3252175070629874], [8.88888888888889, 0.2644734737485314, -0.01704791569377051, -0.06993756572810708, 0.2530146178799046, -0.28695636861096796], [8.98989898989899, 0.27141541486080034, -0.018754664430582258, -0.047645905286918415, 0.2803411986978071, -0.26050237245803687], [9.09090909090909, 0.23310957502890545, 0.023351271333973824, -0.0534656346963832, 0.2864782651162177, -0.22288550980931254], [9.191919191919192, 0.23059293231131273, 0.05027587490705903, -0.011026913167105537, 0.3322784331362434, -0.2606669281995417], [9.292929292929292, 0.2085917232595671, 0.018874110108637612, -0.019439682933223672, 0.37720986997886374, -0.2961009541853599], [9.393939393939394, 0.1809473763813979, -0.025311241360994996, -0.019262822578902498, 0.33887023591592613, -0.2520177076385989], [9.494949494949495, 0.1342340004785835, 0.00907353090976163, -0.02011582675379024, 0.3888566770590382, -0.21631475772069653], [9.595959595959595, 0.13149140672798093, -0.036219743163325636, -0.05919527080086895, 0.43500898726806175, -0.24931550336699654], [9.696969696969697, 0.15216088634787175, -0.01813193685627843, -0.08806902835003817, 0.3960489868426003, -0.2318080442320191], [9.797979797979798, 0.12934071244081327, 0.008640194083700824, -0.11818640254272607, 0.44434472431402766, -0.24490229526610502], [9.8989898989899, 0.09303889497570944, 0.026584102557884137, -0.13229350306811974, 0.44669054331200125, -0.2427868482047157], [10.0, 0.07355646278139491, 0.006369354822276661, -0.08271934087419733, 0.43946786921906317, -0.25889188319149026]]}, \"id\": \"el96414536208400\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145362084009677138615\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.40000000000000002, 0.5], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543922128\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939152\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543939728\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940176\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543940624\"}], \"markers\": [], \"id\": \"el96414536208656\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.40000000000000002, 0.5], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536322320\", \"ydomain\": [-0.40000000000000002, 0.5], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535955536\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414543961232\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414543960528\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414543985424\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414543987024\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543922128\"], [\"el96414543939152\"], [\"el96414543939728\"], [\"el96414543940176\"], [\"el96414543940624\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536208656\", \"alpha_sel\": 1}, {\"element_ids\": [[\"el96414535955536\"], [\"el96414543961232\"], [\"el96414543960528\"], [\"el96414543985424\"], [\"el96414543987024\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": \"el96414536322320\", \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.02840067756646486, 0.02687184131562186, 0.022309101293423096, -0.040520558753517226, 0.013635696924488405], [0.10101010101010101, 0.03179812151327309, -0.01167202467660099, 0.0632038845753653, -0.03801110506817668, 0.025285594688218716], [0.20202020202020202, 0.060312951659750966, -0.03818570179636112, 0.05584721731907224, 0.004371422071307217, -0.01036339214600741], [0.30303030303030304, 0.07620707333706012, 0.009929984657560842, 0.06712507602627146, 0.020078064069461696, -0.04026362165717029], [0.40404040404040403, 0.0990535517418711, 0.03157173654235006, 0.028414248918645905, 0.037193083547429714, -0.03570312312718482], [0.5050505050505051, 0.05385280661864318, 0.05624833210749332, 0.0381344660728319, 0.0025469630503997948, -0.04087767791858277], [0.6060606060606061, 0.006723036970534946, 0.03018626819705308, 0.03425613654347646, 0.0005110585629684778, -0.010529764386572313], [0.7070707070707071, -0.03879575385483504, -0.003248474342375896, 0.008209154877183676, -0.02804735530279913, -0.005182315328830597], [0.8080808080808081, 0.005679001197712488, -0.0397067203937853, -0.02097927042896283, -0.018471918565825085, -0.044873050830349766], [0.9090909090909091, 0.025159349352170374, 0.0015874873950228324, -0.01205556879534875, 0.00562099039062889, -0.03592727041596789], [1.0101010101010102, 0.0021059762546301736, 0.01075968418630041, -0.0302906175007722, -0.0064019157303979776, -0.021842592424396685], [1.1111111111111112, 0.02432395208736187, 0.06049234255876815, -0.06673413527308236, -0.04552162943433488, -0.012976553641802986], [1.2121212121212122, -0.018244743751200117, 0.09058286618511659, -0.03211765757102135, -0.09256371534422031, -0.03985643112998763], [1.3131313131313131, 0.007251598437850865, 0.07760050483266426, -0.07252453764858044, -0.09496092142615384, -0.021463415565339112], [1.4141414141414141, -0.01113531574836157, 0.049838886111760156, -0.06420930209726715, -0.06031728104037251, -0.024606805081254342], [1.5151515151515151, 0.03238726866316327, 0.08923508605702789, -0.050118614479306385, -0.060568279232830965, -0.0038873488242423364], [1.6161616161616161, 0.04637145012429174, 0.09503802662714676, -0.02426789269046568, -0.04896179890250946, -0.00962093178985009], [1.7171717171717171, 0.08931332456409788, 0.07086379830698775, -0.0474070520479612, -0.08894047921827114, -0.004876632439890544], [1.8181818181818181, 0.1347220467671454, 0.11217869124987193, -0.097217118480712, -0.13532985836972383, 0.013104671687611532], [1.9191919191919191, 0.13282079973324687, 0.14469540878506482, -0.05111451335425747, -0.18468455058873443, -0.004627501601718334], [2.0202020202020203, 0.08582079873408635, 0.09650719594382727, -0.022492608527452825, -0.1992153145557409, -0.04011114573454238], [2.121212121212121, 0.04900747909875284, 0.13099569218035806, -0.03542740124453446, -0.1724094354492095, 0.0052743264807799325], [2.2222222222222223, 0.07115816806337424, 0.13659642768482194, -0.060917545375678804, -0.2116674764915648, -0.006973595060531926], [2.323232323232323, 0.0893942167500038, 0.10961543631484458, -0.037522665613057546, -0.19221911275132134, 0.036275673710285596], [2.4242424242424243, 0.043421408695934596, 0.06852964083643737, 0.003074338676619187, -0.2233743469241643, 0.05815969252088248], [2.525252525252525, 0.08692706905611239, 0.04368509816894352, -0.037945126960897496, -0.19511669004712312, 0.032249116715558274], [2.6262626262626263, 0.10392659649513997, 0.02321946963798388, -0.08048774675781681, -0.1556360658351747, -0.004971816536504178], [2.727272727272727, 0.07858666760885737, 0.05516252040552457, -0.12811599104885849, -0.1452550530505478, -0.020752780132375158], [2.8282828282828283, 0.05599674153814447, 0.011678291954969215, -0.08399453683091891, -0.11333681054965275, -0.06505619943544108], [2.929292929292929, 0.10039825526979274, 0.006363980814895812, -0.10244201652907478, -0.07096247213210363, -0.0958630015963629], [3.0303030303030303, 0.14965600441834093, -0.010611565130491905, -0.09174124478695023, -0.03519429027196583, -0.09067671601085024], [3.131313131313131, 0.14405407257950437, -0.04841191762817615, -0.11651232186654428, -0.03124786801676201, -0.04651048063787737], [3.2323232323232323, 0.17974063784044, -0.059369791815287676, -0.11519104462304525, 0.001388049143582034, -0.09126077260135812], [3.3333333333333335, 0.15472376419436054, -0.04540364511358898, -0.07365176952802191, 0.046826929220601596, -0.12107404083824667], [3.4343434343434343, 0.11884724829426749, 0.004355069158369397, -0.05070946019906136, 0.09059458919605647, -0.07526283079274684], [3.5353535353535355, 0.15069597638144533, -0.03291530945310719, -0.05870705758211867, 0.04098903672764771, -0.07431987775585097], [3.6363636363636362, 0.1111845379743272, -0.0508778009083727, -0.03059078495641603, 0.08271187703453801, -0.06774019995344764], [3.7373737373737375, 0.11475125171321458, -0.09651646596997425, -0.07878164713110213, 0.10863457304535365, -0.04285264939961992], [3.8383838383838382, 0.14902201618378452, -0.04673508989439822, -0.056644786329712524, 0.070896839857118, -0.021965091105701724], [3.9393939393939394, 0.15698588673016375, -0.01223768019509406, -0.08647493695291036, 0.11364659254770781, 0.018882379900925735], [4.040404040404041, 0.15188074228844942, 0.0027574004605755206, -0.07876635506833053, 0.13749915369947716, -0.006831806478916874], [4.141414141414141, 0.10962449471570279, 0.016403278869358398, -0.11179831080680502, 0.11636211365312094, -0.04905487966186751], [4.242424242424242, 0.11985063383617332, 0.025810080377357162, -0.09783889482636969, 0.1493233306536379, -0.0930335476920073], [4.343434343434343, 0.09872727526737692, 0.05769025389277689, -0.10796351783199581, 0.1984973449092682, -0.05011477500063569], [4.444444444444445, 0.06970177920810161, 0.05842369322870431, -0.14060088952239141, 0.22819010386939323, -0.04290238844723737], [4.545454545454545, 0.08528558063626944, 0.059033774386597924, -0.11446612961423228, 0.23414790213733755, -0.06950775538131085], [4.646464646464646, 0.0929280897285879, 0.06379677274125407, -0.14575389017516194, 0.20102123343448322, -0.11244392811127144], [4.747474747474747, 0.05077013878523526, 0.029169557210963093, -0.179320109370822, 0.1604101444466472, -0.14736423067076326], [4.848484848484849, 0.06812937988834697, 0.021056191574026863, -0.16909241326719765, 0.20495117956286033, -0.17894990336992636], [4.94949494949495, 0.0394558429885684, 0.02271934825914972, -0.13711034757004126, 0.21301371352762902, -0.13253791271687876], [5.05050505050505, 0.06127098807565997, 0.035486662517369295, -0.09623822195735482, 0.2169422163532638, -0.10408193941493833], [5.151515151515151, 0.10025640578455666, -0.0005452028592127234, -0.13254395918729323, 0.19574275728464582, -0.15218706030328638], [5.252525252525253, 0.09032388672808395, -0.01224104258886638, -0.15965995492848745, 0.15209596893865215, -0.13636075761265634], [5.353535353535354, 0.09150246563073833, -0.006084119479581862, -0.1521138158543387, 0.17115625788275068, -0.13331424037008763], [5.454545454545454, 0.09850682391902282, -0.026342666315929023, -0.11210191051824575, 0.18996568574812736, -0.17529400585122318], [5.555555555555555, 0.1213745292883685, -0.012251387213793066, -0.10962991722806188, 0.14876844035026465, -0.20867769407390588], [5.656565656565657, 0.08170155777172636, -0.012757503303135312, -0.10322940803075524, 0.10158600616866414, -0.19029709944062134], [5.757575757575758, 0.061429636623974826, -0.011511151327324502, -0.10373781546624616, 0.12855143562830024, -0.1858676818983594], [5.858585858585858, 0.04545565240070268, -0.058872447930307714, -0.13180577616144995, 0.10914349271043863, -0.21635664258507403], [5.959595959595959, 0.08228003067483124, -0.01638688220357682, -0.08879974057991483, 0.10018508126058845, -0.24437257443235513], [6.0606060606060606, 0.11349545005514027, -0.05574244809046229, -0.07440706051255011, 0.09948821533420027, -0.2212391660151325], [6.161616161616162, 0.15883510559827763, -0.0360876533406988, -0.03391126664647507, 0.06617169973156725, -0.17202629723946822], [6.262626262626262, 0.1893847455166775, 0.006857011415195541, -0.029902529862871577, 0.09045508504175309, -0.199190985583555], [6.363636363636363, 0.15478971809088607, 0.03198227142707905, 0.005482749314467447, 0.12671597661073497, -0.1854810901963457], [6.4646464646464645, 0.14299128884364531, 0.0024944879843130374, 0.023726178435204002, 0.14853557725873728, -0.23392835241736976], [6.565656565656566, 0.1674975657216802, 0.018770884515803183, -0.014566019621738865, 0.1418953845377299, -0.26051809565023476], [6.666666666666667, 0.13593609371680024, -0.029163907384916348, -0.019716841689167628, 0.1257814035691863, -0.2693181804200074], [6.767676767676767, 0.18523304899975218, -0.06264056318247052, 0.01760320612293294, 0.11164197543870463, -0.27363545132785594], [6.8686868686868685, 0.2212387883636635, -0.05727990611194737, 0.05524302044326938, 0.1497878913934971, -0.24605813489979228], [6.96969696969697, 0.17994895438563963, -0.0995038361490613, 0.08490816757554658, 0.19257185520336367, -0.24507232648232305], [7.070707070707071, 0.20762169300878228, -0.10164096450943451, 0.12248804143760475, 0.19853636431865856, -0.2178717913709969], [7.171717171717171, 0.23660808124756233, -0.07757880434088146, 0.0749219461753132, 0.2256291481294228, -0.2124050244953666], [7.2727272727272725, 0.24619249664748077, -0.06611196004928217, 0.06889629775656833, 0.2550375557694349, -0.17603795142330556], [7.373737373737374, 0.27298890253504215, -0.06020429338318017, 0.035175448092644515, 0.2785182131647867, -0.1307911148320617], [7.474747474747475, 0.304935452082777, -0.03267460559776733, 0.047398346870800245, 0.27842300739020764, -0.16359629449314333], [7.575757575757575, 0.2787117425236002, -0.015786855267984096, 0.03639731406452108, 0.24186167720804352, -0.1552795401437669], [7.6767676767676765, 0.2720753356015167, -0.04623938550592864, 0.02882844937270366, 0.249456793116769, -0.16147852763394807], [7.777777777777778, 0.28103793866459786, -0.010780349475249223, 0.00037479807555165084, 0.213027401783494, -0.18958546246814575], [7.878787878787879, 0.23641260495602562, 0.024938855601484705, -0.01251823535948491, 0.22319984461526893, -0.14191697718369653], [7.979797979797979, 0.2808557671896768, 0.04817655352183901, -0.033447370258724476, 0.2528211930262095, -0.18399171925670765], [8.080808080808081, 0.2992920459026065, 0.05663795646458732, -0.05345433035723056, 0.21616112811679578, -0.15263968994209473], [8.181818181818182, 0.33723558853920915, 0.05960202999431345, -0.03568563628193862, 0.17305347242640995, -0.17340999086152495], [8.282828282828282, 0.321525123616799, 0.07442615930762796, -0.039351172120893285, 0.15660322382601563, -0.2023178003504919], [8.383838383838384, 0.2866232259291582, 0.04452839837201389, -0.04492312035821716, 0.18003517980073336, -0.21550120488314953], [8.484848484848484, 0.27269357217642604, 0.02077253708850808, -0.06348198803673893, 0.21632095959070158, -0.22087228561588626], [8.585858585858587, 0.320074154497909, 0.0654155518412849, -0.09544658048498847, 0.2229335645332259, -0.24608822416014892], [8.686868686868687, 0.3014706809242124, 0.03569679328337175, -0.09252087866431787, 0.21168422014377516, -0.2859327632057319], [8.787878787878787, 0.270177571767119, 0.005378121415455975, -0.06123135588747627, 0.2081052767292258, -0.3252175070629874], [8.88888888888889, 0.2644734737485314, -0.01704791569377051, -0.06993756572810708, 0.2530146178799046, -0.28695636861096796], [8.98989898989899, 0.27141541486080034, -0.018754664430582258, -0.047645905286918415, 0.2803411986978071, -0.26050237245803687], [9.09090909090909, 0.23310957502890545, 0.023351271333973824, -0.0534656346963832, 0.2864782651162177, -0.22288550980931254], [9.191919191919192, 0.23059293231131273, 0.05027587490705903, -0.011026913167105537, 0.3322784331362434, -0.2606669281995417], [9.292929292929292, 0.2085917232595671, 0.018874110108637612, -0.019439682933223672, 0.37720986997886374, -0.2961009541853599], [9.393939393939394, 0.1809473763813979, -0.025311241360994996, -0.019262822578902498, 0.33887023591592613, -0.2520177076385989], [9.494949494949495, 0.1342340004785835, 0.00907353090976163, -0.02011582675379024, 0.3888566770590382, -0.21631475772069653], [9.595959595959595, 0.13149140672798093, -0.036219743163325636, -0.05919527080086895, 0.43500898726806175, -0.24931550336699654], [9.696969696969697, 0.15216088634787175, -0.01813193685627843, -0.08806902835003817, 0.3960489868426003, -0.2318080442320191], [9.797979797979798, 0.12934071244081327, 0.008640194083700824, -0.11818640254272607, 0.44434472431402766, -0.24490229526610502], [9.8989898989899, 0.09303889497570944, 0.026584102557884137, -0.13229350306811974, 0.44669054331200125, -0.2427868482047157], [10.0, 0.07355646278139491, 0.006369354822276661, -0.08271934087419733, 0.43946786921906317, -0.25889188319149026]]}, \"id\": \"el96414536208400\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 4, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10ed72fd0>" | |
] | |
} | |
], | |
"prompt_number": 4 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## single legend for different axes\n", | |
"\n", | |
"However, we can also use a single legend across axes" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"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", | |
"\n", | |
"fig = plt.figure()\n", | |
"ax1 = fig.add_subplot(2,1,1)\n", | |
"ax2 = fig.add_subplot(2,1,2)\n", | |
"\n", | |
"labels = [\"a\", \"b\", \"c\", \"d\", \"e\"]\n", | |
"l1 = ax1.plot(x, y.T, lw=4, alpha=0.1)\n", | |
"s1 = []\n", | |
"for i in range(N_paths):\n", | |
" s = ax2.scatter(x,y[i, :], c=next(ax2._get_lines.color_cycle), alpha=0.1)\n", | |
" s1.append(s)\n", | |
" \n", | |
"plugins.connect(fig, InteractiveLegendPlugin(zip(l1, s1), labels))\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145439092647916760469\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439092647916760469\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.30000000000000004], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349072\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349648\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350224\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350672\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560351120\"}], \"markers\": [], \"id\": \"el96414543909584\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.5, 0.30000000000000004], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536828688\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535956496\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414560375760\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414560398288\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414560399888\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414560409872\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414560349072\", \"el96414535956496\"], [\"el96414560349648\", \"el96414560375760\"], [\"el96414560350224\", \"el96414560398288\"], [\"el96414560350672\", \"el96414560399888\"], [\"el96414560351120\", \"el96414560409872\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.030555863999067113, -0.006202018279893274, -0.04317672612580015, -0.014887530445236186, 0.01526944852317691], [0.10101010101010101, 0.012977340958028837, -0.012499103228017972, -0.0024044885919912787, -0.01892081718084735, 0.04189389365395544], [0.20202020202020202, 0.06216127750958454, -0.00013925493185290572, 0.00957007190435491, -0.023214819341383655, 0.08638112649430621], [0.30303030303030304, 0.03923330286776334, 0.04272059922994619, 0.04650245065484266, -0.05153077092248869, 0.12301943062930737], [0.40404040404040403, 0.03860726365190317, 0.03494180073815104, 0.07942753371795133, -0.04661235812429964, 0.11738763006387955], [0.5050505050505051, 0.020777668869626325, 0.06232957319254855, 0.11029903754061549, -0.0642878084021301, 0.09873125910049542], [0.6060606060606061, 0.0023250440393195494, 0.042257486277200676, 0.15231255157226115, -0.10177651282019776, 0.11624509974936985], [0.7070707070707071, 0.04389949259739634, 0.06002169329098202, 0.20166920109502187, -0.09026154032836985, 0.1431691287775506], [0.8080808080808081, 0.028809621888148895, 0.07269794105556306, 0.18248732096215955, -0.09966924986512425, 0.11336760171764451], [0.9090909090909091, 0.03611389898617594, 0.05170985595905993, 0.14775783643493415, -0.10730296197811602, 0.06402828924454054], [1.0101010101010102, -0.00911687806958876, 0.04620672907851873, 0.16701409612247992, -0.0986279511334995, 0.023335636588162248], [1.1111111111111112, -0.047587682382969766, 0.07113798736928374, 0.19297311233084866, -0.05588418248190363, -0.0009130793385721293], [1.2121212121212122, -0.04729648279260197, 0.0744995784808595, 0.23198961335435953, -0.09208321300889288, -0.04057279324590833], [1.3131313131313131, -0.02729614812626794, 0.10304140432130778, 0.19010169805721697, -0.047008766705697924, -0.06900649343011783], [1.4141414141414141, -0.0745247934876615, 0.10181306742189992, 0.2084077725173817, -0.09168700702248397, -0.07151606197213096], [1.5151515151515151, -0.07413377595787375, 0.09693181503204508, 0.18180811644735065, -0.0791375001210767, -0.027014827669032626], [1.6161616161616161, -0.06966488300097276, 0.12595040999530335, 0.1373532443767869, -0.0942338082721367, -0.04086963543889579], [1.7171717171717171, -0.07216294766741821, 0.10517093829411447, 0.10182441200088867, -0.14095832396403032, -0.05018221084596543], [1.8181818181818181, -0.08176210282610322, 0.08557603785513059, 0.07721762980046291, -0.1717430036352166, -0.06607193686985025], [1.9191919191919191, -0.07532396706812391, 0.047014746209270264, 0.040437471271639464, -0.1317844705959001, -0.06311881262104867], [2.0202020202020203, -0.07281519728694938, 0.046121179809214694, 0.07082858426741813, -0.08979153653882507, -0.055807937111842926], [2.121212121212121, -0.08263839681412846, 0.022553980320265815, 0.09370849285480015, -0.04614661297212448, -0.04645581575963252], [2.2222222222222223, -0.08979256312587008, 0.043327879475429446, 0.07767931052778554, -0.06235176683118886, -0.07130887210782338], [2.323232323232323, -0.05014525741315165, 0.044202785774956614, 0.10778382598305375, -0.03020360720654943, -0.03920574036103558], [2.4242424242424243, -0.07296175093235219, 0.08925579521843141, 0.14030688202294844, -0.07270054228141243, -0.0688234479826357], [2.525252525252525, -0.118335833507582, 0.07556591444826918, 0.13076472071831544, -0.08515717314631016, -0.0935141066877539], [2.6262626262626263, -0.10616339785277948, 0.050583613340500086, 0.10919175907830553, -0.11346390901653651, -0.0787126337770314], [2.727272727272727, -0.1533561844157208, 0.06980225040659797, 0.07309508894077475, -0.10444086315308375, -0.12186448935303837], [2.8282828282828283, -0.14600019587467097, 0.0232648979004184, 0.12024148210958582, -0.13424107577182098, -0.07668171903483158], [2.929292929292929, -0.17743141482114733, -0.0022065363721899094, 0.13691836917084482, -0.17035627879484758, -0.11717065220516787], [3.0303030303030303, -0.18398467519618522, 0.036648944600967695, 0.10982866614844325, -0.13687848282602325, -0.12048778403058467], [3.131313131313131, -0.19091950317137646, 0.009977424746275623, 0.11601412614678626, -0.1561639240745506, -0.10617829266173681], [3.2323232323232323, -0.19874832301004403, 0.004312481125103997, 0.07290899993185136, -0.15968910745299533, -0.14209537163908795], [3.3333333333333335, -0.20613507918411525, -0.007593567441102077, 0.026751098350879667, -0.14334062773976092, -0.18567651853366895], [3.4343434343434343, -0.19975865613155938, -0.02721404402741927, 0.07070336672162426, -0.10520902035055568, -0.20216781874696985], [3.5353535353535355, -0.18693858093936844, 0.005631901495697044, 0.0839447440878392, -0.14968436468851642, -0.15509631591669723], [3.6363636363636362, -0.14766059816249485, 0.037000813142523264, 0.08230884176381631, -0.1160075382543759, -0.13628528474717513], [3.7373737373737375, -0.132236285791181, 0.0745643288660727, 0.12775556914223596, -0.11331226502688024, -0.09463852974412199], [3.8383838383838382, -0.17532228890044899, 0.11776206451633084, 0.10168056018930233, -0.10473840912235685, -0.052900880348260786], [3.9393939393939394, -0.1479613974095247, 0.11438712946207252, 0.08605662641776106, -0.09687022469327021, -0.012647314555239264], [4.040404040404041, -0.10530495708476842, 0.13228115635969567, 0.1246154320117524, -0.10333169662404025, 0.008548057567573132], [4.141414141414141, -0.14676936845570512, 0.08705596751754402, 0.07835975897529221, -0.059227559935866016, 0.030091966377495484], [4.242424242424242, -0.18051985554108851, 0.07049545967995388, 0.08141016600942604, -0.08215200941477202, -0.016226683060601044], [4.343434343434343, -0.1704131789954352, 0.09418529932483086, 0.11826262703450596, -0.07312740302189534, -0.061344552901182584], [4.444444444444445, -0.19333852273345192, 0.05480890662517429, 0.10757247851942256, -0.02320478350668225, -0.058309119841011975], [4.545454545454545, -0.15923586346419855, 0.06331126351926455, 0.1548810608685595, -0.005870778367591249, -0.026212736961774737], [4.646464646464646, -0.18638412109719757, 0.05054936241991536, 0.134744829776764, 0.017173838849401355, -0.03787594405489783], [4.747474747474747, -0.2134481361499876, 0.021307280909217012, 0.11770578278878399, 0.015429836082182355, -0.05549336804214389], [4.848484848484849, -0.25359300419602016, -0.005840250666253929, 0.07830871750839825, 0.016910517197328476, -0.021683372386434217], [4.94949494949495, -0.22063840569397514, 0.0013805319189096922, 0.06759532218617993, 0.011700950874976187, -0.021747330739354087], [5.05050505050505, -0.23317849028337, -0.020437385788871585, 0.06545558174475817, 0.028306580724930107, -0.03684444081595931], [5.151515151515151, -0.21553653288527494, -0.007612102638185989, 0.03813544321909029, 0.010798026912880773, -0.0616895561050413], [5.252525252525253, -0.21530370919276015, -0.021337308944241195, 0.04840432811785954, 0.0436755462366964, -0.07508986987565186], [5.353535353535354, -0.1982384026600583, -0.011348944394919534, 0.038390849153115914, 0.022956617683160558, -0.0918879347750418], [5.454545454545454, -0.19910860281663967, 0.033587113339515896, 0.017437323271715887, 0.06098479589271151, -0.10086403189328592], [5.555555555555555, -0.20157330867138865, 0.07702103775701141, 0.009085175230896147, 0.023222572409401752, -0.14506964753143659], [5.656565656565657, -0.18955755325166693, 0.03714730806145063, 0.042258794096319996, -0.01367413894988876, -0.16620517980141483], [5.757575757575758, -0.23480380518502392, 0.04117573367069991, 0.05753325723683526, -0.0010709980880194703, -0.21409896164981765], [5.858585858585858, -0.23933098926868132, 0.0861262739317328, 0.015570743042936354, -0.020155653642565875, -0.17240617451839305], [5.959595959595959, -0.20755818406547208, 0.11133061053165177, 0.03672549960744973, 0.006884172750290751, -0.12851025300126853], [6.0606060606060606, -0.21218418079793264, 0.07206227527518735, 0.04303537293064415, 0.0043247819387559824, -0.08978311872482904], [6.161616161616162, -0.24191759140877883, 0.08672968649201976, 0.0929727035756677, 0.048536416898019845, -0.05922996957741916], [6.262626262626262, -0.27770720274103317, 0.07721753241251912, 0.12350529644718981, 0.04875021832055535, -0.06950272961808288], [6.363636363636363, -0.251448522284951, 0.10877931017708022, 0.09118958092824744, 0.07964089388029744, -0.09462076544434557], [6.4646464646464645, -0.2695603542996568, 0.07048435055841454, 0.07312720608274849, 0.03079653831887242, -0.04636216110144438], [6.565656565656566, -0.2727239732542367, 0.03085167306463195, 0.029135159077759522, -0.011788140203311578, -0.08670885547216217], [6.666666666666667, -0.24799538233138418, 0.007633568573671801, 0.04886783573284762, -0.022672813365449025, -0.05423749952363422], [6.767676767676767, -0.2452905959188015, 0.008578845456738116, 0.004238269761799036, -0.054176467064426734, -0.017419997214002142], [6.8686868686868685, -0.2531293214945788, 0.043751641379381964, -0.023813779465419054, -0.06351480329536027, -0.05756952321699342], [6.96969696969697, -0.2111419940963998, 0.04432341468526896, 0.019624456631015693, -0.09217473800023179, -0.06507352486215658], [7.070707070707071, -0.20761301694753126, 0.07041057363818257, 0.007982827633323848, -0.12559578721489728, -0.07973105498158585], [7.171717171717171, -0.17104036639884185, 0.03211584481554717, 0.024591087305175223, -0.1292365717645228, -0.059663575805837955], [7.2727272727272725, -0.19064738772357048, -0.0031352559980858813, -0.01989572812274476, -0.17354350458189582, -0.04892277319296332], [7.373737373737374, -0.19733670820075824, -0.024592232986755266, -0.042674677347751086, -0.17712825410760363, -0.07510956451271225], [7.474747474747475, -0.15578641138391308, -0.019528900188660513, -0.05756640993153514, -0.12780385142457365, -0.10340594380107054], [7.575757575757575, -0.14986980390667926, 0.009410626991134853, -0.014135276956841553, -0.1503531232081407, -0.13151828392931994], [7.6767676767676765, -0.19355033276061606, -0.036874677952142075, -0.017912050135356933, -0.10489454428271527, -0.13925486661323855], [7.777777777777778, -0.2336388529371917, -0.05487491455175636, -0.03230123441675054, -0.13244167056931685, -0.1650485446389775], [7.878787878787879, -0.25196095716939015, -0.032513514296916755, 0.016223537849482855, -0.1130261058216951, -0.19542989365057156], [7.979797979797979, -0.220246542481095, -0.010437056889443127, 0.06120536271599096, -0.1333910116372773, -0.19481234782610815], [8.080808080808081, -0.2592795042924607, -0.04273367847712779, 0.0720083000189702, -0.15073385682408372, -0.18120120602653697], [8.181818181818182, -0.3047243109367145, -0.09071764618811841, 0.04024545232677595, -0.1503633143560101, -0.21475064781654427], [8.282828282828282, -0.25758349461483904, -0.13060046807828368, 0.01689719097032061, -0.19014000845944445, -0.22264696284218208], [8.383838383838384, -0.28764612595250927, -0.10434201652547372, 0.027405957741159462, -0.19638080784959805, -0.24997268337426645], [8.484848484848484, -0.320213339895706, -0.1452740029313934, 0.062150822218259245, -0.23000588676946243, -0.20126518387950182], [8.585858585858587, -0.3286319648673182, -0.13815134154940759, 0.03318012114310999, -0.2614398413875613, -0.15434768441529376], [8.686868686868687, -0.3230522034736079, -0.1183687067997613, -0.014777438963707534, -0.22202308531271708, -0.11633568425813369], [8.787878787878787, -0.336870602953267, -0.13905635769717248, -0.0394495507467411, -0.26225436457586787, -0.13663385817888435], [8.88888888888889, -0.3539204491036708, -0.11043204700742938, -0.06590622427352841, -0.30733353682936704, -0.10374093994019656], [8.98989898989899, -0.37269175561037443, -0.08795952093738282, -0.07711698344367127, -0.2723125047397964, -0.13237405012574147], [9.09090909090909, -0.38426734865793144, -0.06748987700274349, -0.0988207603704015, -0.23527062931413592, -0.1474926257500554], [9.191919191919192, -0.4303538360301218, -0.06985844303352327, -0.09696020784175012, -0.2778031248707663, -0.1534142541872889], [9.292929292929292, -0.4029239843943294, -0.1077834089867474, -0.060743295072960994, -0.24998370788738672, -0.10547914913002138], [9.393939393939394, -0.40334428735225114, -0.12200729959602938, -0.07655591007687747, -0.20744721080313144, -0.10837435572056328], [9.494949494949495, -0.40090430540334066, -0.11532177383547706, -0.029139441734493468, -0.25024992216520836, -0.12086723136781251], [9.595959595959595, -0.39085223554282533, -0.09733227739046708, -0.02375677529624281, -0.29503256637570285, -0.07634747054615115], [9.696969696969697, -0.4037250541089211, -0.09458476444464829, -0.03414364730678048, -0.2745201630883748, -0.027935286909318686], [9.797979797979798, -0.38656083207047137, -0.0883993653268611, -0.05497831726944701, -0.23277602681289325, -0.0004735886676581133], [9.8989898989899, -0.4115516619906451, -0.10705877271775582, -0.049571385639361934, -0.25750154558439814, -0.04201590572112202], [10.0, -0.3647131066875382, -0.07292799812951825, -0.06582516435464675, -0.2708152237866127, -0.020370041304541547]]}, \"id\": \"el96414543909264\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439092647916760469\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.30000000000000004], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349072\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349648\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350224\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350672\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560351120\"}], \"markers\": [], \"id\": \"el96414543909584\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.5, 0.30000000000000004], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536828688\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535956496\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414560375760\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414560398288\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414560399888\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414560409872\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414560349072\", \"el96414535956496\"], [\"el96414560349648\", \"el96414560375760\"], [\"el96414560350224\", \"el96414560398288\"], [\"el96414560350672\", \"el96414560399888\"], [\"el96414560351120\", \"el96414560409872\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.030555863999067113, -0.006202018279893274, -0.04317672612580015, -0.014887530445236186, 0.01526944852317691], [0.10101010101010101, 0.012977340958028837, -0.012499103228017972, -0.0024044885919912787, -0.01892081718084735, 0.04189389365395544], [0.20202020202020202, 0.06216127750958454, -0.00013925493185290572, 0.00957007190435491, -0.023214819341383655, 0.08638112649430621], [0.30303030303030304, 0.03923330286776334, 0.04272059922994619, 0.04650245065484266, -0.05153077092248869, 0.12301943062930737], [0.40404040404040403, 0.03860726365190317, 0.03494180073815104, 0.07942753371795133, -0.04661235812429964, 0.11738763006387955], [0.5050505050505051, 0.020777668869626325, 0.06232957319254855, 0.11029903754061549, -0.0642878084021301, 0.09873125910049542], [0.6060606060606061, 0.0023250440393195494, 0.042257486277200676, 0.15231255157226115, -0.10177651282019776, 0.11624509974936985], [0.7070707070707071, 0.04389949259739634, 0.06002169329098202, 0.20166920109502187, -0.09026154032836985, 0.1431691287775506], [0.8080808080808081, 0.028809621888148895, 0.07269794105556306, 0.18248732096215955, -0.09966924986512425, 0.11336760171764451], [0.9090909090909091, 0.03611389898617594, 0.05170985595905993, 0.14775783643493415, -0.10730296197811602, 0.06402828924454054], [1.0101010101010102, -0.00911687806958876, 0.04620672907851873, 0.16701409612247992, -0.0986279511334995, 0.023335636588162248], [1.1111111111111112, -0.047587682382969766, 0.07113798736928374, 0.19297311233084866, -0.05588418248190363, -0.0009130793385721293], [1.2121212121212122, -0.04729648279260197, 0.0744995784808595, 0.23198961335435953, -0.09208321300889288, -0.04057279324590833], [1.3131313131313131, -0.02729614812626794, 0.10304140432130778, 0.19010169805721697, -0.047008766705697924, -0.06900649343011783], [1.4141414141414141, -0.0745247934876615, 0.10181306742189992, 0.2084077725173817, -0.09168700702248397, -0.07151606197213096], [1.5151515151515151, -0.07413377595787375, 0.09693181503204508, 0.18180811644735065, -0.0791375001210767, -0.027014827669032626], [1.6161616161616161, -0.06966488300097276, 0.12595040999530335, 0.1373532443767869, -0.0942338082721367, -0.04086963543889579], [1.7171717171717171, -0.07216294766741821, 0.10517093829411447, 0.10182441200088867, -0.14095832396403032, -0.05018221084596543], [1.8181818181818181, -0.08176210282610322, 0.08557603785513059, 0.07721762980046291, -0.1717430036352166, -0.06607193686985025], [1.9191919191919191, -0.07532396706812391, 0.047014746209270264, 0.040437471271639464, -0.1317844705959001, -0.06311881262104867], [2.0202020202020203, -0.07281519728694938, 0.046121179809214694, 0.07082858426741813, -0.08979153653882507, -0.055807937111842926], [2.121212121212121, -0.08263839681412846, 0.022553980320265815, 0.09370849285480015, -0.04614661297212448, -0.04645581575963252], [2.2222222222222223, -0.08979256312587008, 0.043327879475429446, 0.07767931052778554, -0.06235176683118886, -0.07130887210782338], [2.323232323232323, -0.05014525741315165, 0.044202785774956614, 0.10778382598305375, -0.03020360720654943, -0.03920574036103558], [2.4242424242424243, -0.07296175093235219, 0.08925579521843141, 0.14030688202294844, -0.07270054228141243, -0.0688234479826357], [2.525252525252525, -0.118335833507582, 0.07556591444826918, 0.13076472071831544, -0.08515717314631016, -0.0935141066877539], [2.6262626262626263, -0.10616339785277948, 0.050583613340500086, 0.10919175907830553, -0.11346390901653651, -0.0787126337770314], [2.727272727272727, -0.1533561844157208, 0.06980225040659797, 0.07309508894077475, -0.10444086315308375, -0.12186448935303837], [2.8282828282828283, -0.14600019587467097, 0.0232648979004184, 0.12024148210958582, -0.13424107577182098, -0.07668171903483158], [2.929292929292929, -0.17743141482114733, -0.0022065363721899094, 0.13691836917084482, -0.17035627879484758, -0.11717065220516787], [3.0303030303030303, -0.18398467519618522, 0.036648944600967695, 0.10982866614844325, -0.13687848282602325, -0.12048778403058467], [3.131313131313131, -0.19091950317137646, 0.009977424746275623, 0.11601412614678626, -0.1561639240745506, -0.10617829266173681], [3.2323232323232323, -0.19874832301004403, 0.004312481125103997, 0.07290899993185136, -0.15968910745299533, -0.14209537163908795], [3.3333333333333335, -0.20613507918411525, -0.007593567441102077, 0.026751098350879667, -0.14334062773976092, -0.18567651853366895], [3.4343434343434343, -0.19975865613155938, -0.02721404402741927, 0.07070336672162426, -0.10520902035055568, -0.20216781874696985], [3.5353535353535355, -0.18693858093936844, 0.005631901495697044, 0.0839447440878392, -0.14968436468851642, -0.15509631591669723], [3.6363636363636362, -0.14766059816249485, 0.037000813142523264, 0.08230884176381631, -0.1160075382543759, -0.13628528474717513], [3.7373737373737375, -0.132236285791181, 0.0745643288660727, 0.12775556914223596, -0.11331226502688024, -0.09463852974412199], [3.8383838383838382, -0.17532228890044899, 0.11776206451633084, 0.10168056018930233, -0.10473840912235685, -0.052900880348260786], [3.9393939393939394, -0.1479613974095247, 0.11438712946207252, 0.08605662641776106, -0.09687022469327021, -0.012647314555239264], [4.040404040404041, -0.10530495708476842, 0.13228115635969567, 0.1246154320117524, -0.10333169662404025, 0.008548057567573132], [4.141414141414141, -0.14676936845570512, 0.08705596751754402, 0.07835975897529221, -0.059227559935866016, 0.030091966377495484], [4.242424242424242, -0.18051985554108851, 0.07049545967995388, 0.08141016600942604, -0.08215200941477202, -0.016226683060601044], [4.343434343434343, -0.1704131789954352, 0.09418529932483086, 0.11826262703450596, -0.07312740302189534, -0.061344552901182584], [4.444444444444445, -0.19333852273345192, 0.05480890662517429, 0.10757247851942256, -0.02320478350668225, -0.058309119841011975], [4.545454545454545, -0.15923586346419855, 0.06331126351926455, 0.1548810608685595, -0.005870778367591249, -0.026212736961774737], [4.646464646464646, -0.18638412109719757, 0.05054936241991536, 0.134744829776764, 0.017173838849401355, -0.03787594405489783], [4.747474747474747, -0.2134481361499876, 0.021307280909217012, 0.11770578278878399, 0.015429836082182355, -0.05549336804214389], [4.848484848484849, -0.25359300419602016, -0.005840250666253929, 0.07830871750839825, 0.016910517197328476, -0.021683372386434217], [4.94949494949495, -0.22063840569397514, 0.0013805319189096922, 0.06759532218617993, 0.011700950874976187, -0.021747330739354087], [5.05050505050505, -0.23317849028337, -0.020437385788871585, 0.06545558174475817, 0.028306580724930107, -0.03684444081595931], [5.151515151515151, -0.21553653288527494, -0.007612102638185989, 0.03813544321909029, 0.010798026912880773, -0.0616895561050413], [5.252525252525253, -0.21530370919276015, -0.021337308944241195, 0.04840432811785954, 0.0436755462366964, -0.07508986987565186], [5.353535353535354, -0.1982384026600583, -0.011348944394919534, 0.038390849153115914, 0.022956617683160558, -0.0918879347750418], [5.454545454545454, -0.19910860281663967, 0.033587113339515896, 0.017437323271715887, 0.06098479589271151, -0.10086403189328592], [5.555555555555555, -0.20157330867138865, 0.07702103775701141, 0.009085175230896147, 0.023222572409401752, -0.14506964753143659], [5.656565656565657, -0.18955755325166693, 0.03714730806145063, 0.042258794096319996, -0.01367413894988876, -0.16620517980141483], [5.757575757575758, -0.23480380518502392, 0.04117573367069991, 0.05753325723683526, -0.0010709980880194703, -0.21409896164981765], [5.858585858585858, -0.23933098926868132, 0.0861262739317328, 0.015570743042936354, -0.020155653642565875, -0.17240617451839305], [5.959595959595959, -0.20755818406547208, 0.11133061053165177, 0.03672549960744973, 0.006884172750290751, -0.12851025300126853], [6.0606060606060606, -0.21218418079793264, 0.07206227527518735, 0.04303537293064415, 0.0043247819387559824, -0.08978311872482904], [6.161616161616162, -0.24191759140877883, 0.08672968649201976, 0.0929727035756677, 0.048536416898019845, -0.05922996957741916], [6.262626262626262, -0.27770720274103317, 0.07721753241251912, 0.12350529644718981, 0.04875021832055535, -0.06950272961808288], [6.363636363636363, -0.251448522284951, 0.10877931017708022, 0.09118958092824744, 0.07964089388029744, -0.09462076544434557], [6.4646464646464645, -0.2695603542996568, 0.07048435055841454, 0.07312720608274849, 0.03079653831887242, -0.04636216110144438], [6.565656565656566, -0.2727239732542367, 0.03085167306463195, 0.029135159077759522, -0.011788140203311578, -0.08670885547216217], [6.666666666666667, -0.24799538233138418, 0.007633568573671801, 0.04886783573284762, -0.022672813365449025, -0.05423749952363422], [6.767676767676767, -0.2452905959188015, 0.008578845456738116, 0.004238269761799036, -0.054176467064426734, -0.017419997214002142], [6.8686868686868685, -0.2531293214945788, 0.043751641379381964, -0.023813779465419054, -0.06351480329536027, -0.05756952321699342], [6.96969696969697, -0.2111419940963998, 0.04432341468526896, 0.019624456631015693, -0.09217473800023179, -0.06507352486215658], [7.070707070707071, -0.20761301694753126, 0.07041057363818257, 0.007982827633323848, -0.12559578721489728, -0.07973105498158585], [7.171717171717171, -0.17104036639884185, 0.03211584481554717, 0.024591087305175223, -0.1292365717645228, -0.059663575805837955], [7.2727272727272725, -0.19064738772357048, -0.0031352559980858813, -0.01989572812274476, -0.17354350458189582, -0.04892277319296332], [7.373737373737374, -0.19733670820075824, -0.024592232986755266, -0.042674677347751086, -0.17712825410760363, -0.07510956451271225], [7.474747474747475, -0.15578641138391308, -0.019528900188660513, -0.05756640993153514, -0.12780385142457365, -0.10340594380107054], [7.575757575757575, -0.14986980390667926, 0.009410626991134853, -0.014135276956841553, -0.1503531232081407, -0.13151828392931994], [7.6767676767676765, -0.19355033276061606, -0.036874677952142075, -0.017912050135356933, -0.10489454428271527, -0.13925486661323855], [7.777777777777778, -0.2336388529371917, -0.05487491455175636, -0.03230123441675054, -0.13244167056931685, -0.1650485446389775], [7.878787878787879, -0.25196095716939015, -0.032513514296916755, 0.016223537849482855, -0.1130261058216951, -0.19542989365057156], [7.979797979797979, -0.220246542481095, -0.010437056889443127, 0.06120536271599096, -0.1333910116372773, -0.19481234782610815], [8.080808080808081, -0.2592795042924607, -0.04273367847712779, 0.0720083000189702, -0.15073385682408372, -0.18120120602653697], [8.181818181818182, -0.3047243109367145, -0.09071764618811841, 0.04024545232677595, -0.1503633143560101, -0.21475064781654427], [8.282828282828282, -0.25758349461483904, -0.13060046807828368, 0.01689719097032061, -0.19014000845944445, -0.22264696284218208], [8.383838383838384, -0.28764612595250927, -0.10434201652547372, 0.027405957741159462, -0.19638080784959805, -0.24997268337426645], [8.484848484848484, -0.320213339895706, -0.1452740029313934, 0.062150822218259245, -0.23000588676946243, -0.20126518387950182], [8.585858585858587, -0.3286319648673182, -0.13815134154940759, 0.03318012114310999, -0.2614398413875613, -0.15434768441529376], [8.686868686868687, -0.3230522034736079, -0.1183687067997613, -0.014777438963707534, -0.22202308531271708, -0.11633568425813369], [8.787878787878787, -0.336870602953267, -0.13905635769717248, -0.0394495507467411, -0.26225436457586787, -0.13663385817888435], [8.88888888888889, -0.3539204491036708, -0.11043204700742938, -0.06590622427352841, -0.30733353682936704, -0.10374093994019656], [8.98989898989899, -0.37269175561037443, -0.08795952093738282, -0.07711698344367127, -0.2723125047397964, -0.13237405012574147], [9.09090909090909, -0.38426734865793144, -0.06748987700274349, -0.0988207603704015, -0.23527062931413592, -0.1474926257500554], [9.191919191919192, -0.4303538360301218, -0.06985844303352327, -0.09696020784175012, -0.2778031248707663, -0.1534142541872889], [9.292929292929292, -0.4029239843943294, -0.1077834089867474, -0.060743295072960994, -0.24998370788738672, -0.10547914913002138], [9.393939393939394, -0.40334428735225114, -0.12200729959602938, -0.07655591007687747, -0.20744721080313144, -0.10837435572056328], [9.494949494949495, -0.40090430540334066, -0.11532177383547706, -0.029139441734493468, -0.25024992216520836, -0.12086723136781251], [9.595959595959595, -0.39085223554282533, -0.09733227739046708, -0.02375677529624281, -0.29503256637570285, -0.07634747054615115], [9.696969696969697, -0.4037250541089211, -0.09458476444464829, -0.03414364730678048, -0.2745201630883748, -0.027935286909318686], [9.797979797979798, -0.38656083207047137, -0.0883993653268611, -0.05497831726944701, -0.23277602681289325, -0.0004735886676581133], [9.8989898989899, -0.4115516619906451, -0.10705877271775582, -0.049571385639361934, -0.25750154558439814, -0.04201590572112202], [10.0, -0.3647131066875382, -0.07292799812951825, -0.06582516435464675, -0.2708152237866127, -0.020370041304541547]]}, \"id\": \"el96414543909264\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439092647916760469\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.30000000000000004], \"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.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349072\"}, {\"color\": \"#007F00\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560349648\"}, {\"color\": \"#FF0000\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350224\"}, {\"color\": \"#00BFBF\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560350672\"}, {\"color\": \"#BF00BF\", \"yindex\": 5, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414560351120\"}], \"markers\": [], \"id\": \"el96414543909584\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [-2.0, 12.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-2.0, 12.0], \"ylim\": [-0.5, 0.30000000000000004], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 8, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 10, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536828688\", \"ydomain\": [-0.5, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414535956496\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 2, \"id\": \"el96414560375760\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 3, \"id\": \"el96414560398288\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 4, \"id\": \"el96414560399888\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#00BFBF\"]}, {\"paths\": [[[[0.0, -0.5], [0.13260155, -0.5], [0.25978993539242673, -0.44731684579412084], [0.3535533905932738, -0.3535533905932738], [0.44731684579412084, -0.25978993539242673], [0.5, -0.13260155], [0.5, 0.0], [0.5, 0.13260155], [0.44731684579412084, 0.25978993539242673], [0.3535533905932738, 0.3535533905932738], [0.25978993539242673, 0.44731684579412084], [0.13260155, 0.5], [0.0, 0.5], [-0.13260155, 0.5], [-0.25978993539242673, 0.44731684579412084], [-0.3535533905932738, 0.3535533905932738], [-0.44731684579412084, 0.25978993539242673], [-0.5, 0.13260155], [-0.5, 0.0], [-0.5, -0.13260155], [-0.44731684579412084, -0.25978993539242673], [-0.3535533905932738, -0.3535533905932738], [-0.25978993539242673, -0.44731684579412084], [-0.13260155, -0.5], [0.0, -0.5]], [\"M\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"C\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 5, \"id\": \"el96414560409872\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BF00BF\"]}], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414560349072\", \"el96414535956496\"], [\"el96414560349648\", \"el96414560375760\"], [\"el96414560350224\", \"el96414560398288\"], [\"el96414560350672\", \"el96414560399888\"], [\"el96414560351120\", \"el96414560409872\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\", \"c\", \"d\", \"e\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.030555863999067113, -0.006202018279893274, -0.04317672612580015, -0.014887530445236186, 0.01526944852317691], [0.10101010101010101, 0.012977340958028837, -0.012499103228017972, -0.0024044885919912787, -0.01892081718084735, 0.04189389365395544], [0.20202020202020202, 0.06216127750958454, -0.00013925493185290572, 0.00957007190435491, -0.023214819341383655, 0.08638112649430621], [0.30303030303030304, 0.03923330286776334, 0.04272059922994619, 0.04650245065484266, -0.05153077092248869, 0.12301943062930737], [0.40404040404040403, 0.03860726365190317, 0.03494180073815104, 0.07942753371795133, -0.04661235812429964, 0.11738763006387955], [0.5050505050505051, 0.020777668869626325, 0.06232957319254855, 0.11029903754061549, -0.0642878084021301, 0.09873125910049542], [0.6060606060606061, 0.0023250440393195494, 0.042257486277200676, 0.15231255157226115, -0.10177651282019776, 0.11624509974936985], [0.7070707070707071, 0.04389949259739634, 0.06002169329098202, 0.20166920109502187, -0.09026154032836985, 0.1431691287775506], [0.8080808080808081, 0.028809621888148895, 0.07269794105556306, 0.18248732096215955, -0.09966924986512425, 0.11336760171764451], [0.9090909090909091, 0.03611389898617594, 0.05170985595905993, 0.14775783643493415, -0.10730296197811602, 0.06402828924454054], [1.0101010101010102, -0.00911687806958876, 0.04620672907851873, 0.16701409612247992, -0.0986279511334995, 0.023335636588162248], [1.1111111111111112, -0.047587682382969766, 0.07113798736928374, 0.19297311233084866, -0.05588418248190363, -0.0009130793385721293], [1.2121212121212122, -0.04729648279260197, 0.0744995784808595, 0.23198961335435953, -0.09208321300889288, -0.04057279324590833], [1.3131313131313131, -0.02729614812626794, 0.10304140432130778, 0.19010169805721697, -0.047008766705697924, -0.06900649343011783], [1.4141414141414141, -0.0745247934876615, 0.10181306742189992, 0.2084077725173817, -0.09168700702248397, -0.07151606197213096], [1.5151515151515151, -0.07413377595787375, 0.09693181503204508, 0.18180811644735065, -0.0791375001210767, -0.027014827669032626], [1.6161616161616161, -0.06966488300097276, 0.12595040999530335, 0.1373532443767869, -0.0942338082721367, -0.04086963543889579], [1.7171717171717171, -0.07216294766741821, 0.10517093829411447, 0.10182441200088867, -0.14095832396403032, -0.05018221084596543], [1.8181818181818181, -0.08176210282610322, 0.08557603785513059, 0.07721762980046291, -0.1717430036352166, -0.06607193686985025], [1.9191919191919191, -0.07532396706812391, 0.047014746209270264, 0.040437471271639464, -0.1317844705959001, -0.06311881262104867], [2.0202020202020203, -0.07281519728694938, 0.046121179809214694, 0.07082858426741813, -0.08979153653882507, -0.055807937111842926], [2.121212121212121, -0.08263839681412846, 0.022553980320265815, 0.09370849285480015, -0.04614661297212448, -0.04645581575963252], [2.2222222222222223, -0.08979256312587008, 0.043327879475429446, 0.07767931052778554, -0.06235176683118886, -0.07130887210782338], [2.323232323232323, -0.05014525741315165, 0.044202785774956614, 0.10778382598305375, -0.03020360720654943, -0.03920574036103558], [2.4242424242424243, -0.07296175093235219, 0.08925579521843141, 0.14030688202294844, -0.07270054228141243, -0.0688234479826357], [2.525252525252525, -0.118335833507582, 0.07556591444826918, 0.13076472071831544, -0.08515717314631016, -0.0935141066877539], [2.6262626262626263, -0.10616339785277948, 0.050583613340500086, 0.10919175907830553, -0.11346390901653651, -0.0787126337770314], [2.727272727272727, -0.1533561844157208, 0.06980225040659797, 0.07309508894077475, -0.10444086315308375, -0.12186448935303837], [2.8282828282828283, -0.14600019587467097, 0.0232648979004184, 0.12024148210958582, -0.13424107577182098, -0.07668171903483158], [2.929292929292929, -0.17743141482114733, -0.0022065363721899094, 0.13691836917084482, -0.17035627879484758, -0.11717065220516787], [3.0303030303030303, -0.18398467519618522, 0.036648944600967695, 0.10982866614844325, -0.13687848282602325, -0.12048778403058467], [3.131313131313131, -0.19091950317137646, 0.009977424746275623, 0.11601412614678626, -0.1561639240745506, -0.10617829266173681], [3.2323232323232323, -0.19874832301004403, 0.004312481125103997, 0.07290899993185136, -0.15968910745299533, -0.14209537163908795], [3.3333333333333335, -0.20613507918411525, -0.007593567441102077, 0.026751098350879667, -0.14334062773976092, -0.18567651853366895], [3.4343434343434343, -0.19975865613155938, -0.02721404402741927, 0.07070336672162426, -0.10520902035055568, -0.20216781874696985], [3.5353535353535355, -0.18693858093936844, 0.005631901495697044, 0.0839447440878392, -0.14968436468851642, -0.15509631591669723], [3.6363636363636362, -0.14766059816249485, 0.037000813142523264, 0.08230884176381631, -0.1160075382543759, -0.13628528474717513], [3.7373737373737375, -0.132236285791181, 0.0745643288660727, 0.12775556914223596, -0.11331226502688024, -0.09463852974412199], [3.8383838383838382, -0.17532228890044899, 0.11776206451633084, 0.10168056018930233, -0.10473840912235685, -0.052900880348260786], [3.9393939393939394, -0.1479613974095247, 0.11438712946207252, 0.08605662641776106, -0.09687022469327021, -0.012647314555239264], [4.040404040404041, -0.10530495708476842, 0.13228115635969567, 0.1246154320117524, -0.10333169662404025, 0.008548057567573132], [4.141414141414141, -0.14676936845570512, 0.08705596751754402, 0.07835975897529221, -0.059227559935866016, 0.030091966377495484], [4.242424242424242, -0.18051985554108851, 0.07049545967995388, 0.08141016600942604, -0.08215200941477202, -0.016226683060601044], [4.343434343434343, -0.1704131789954352, 0.09418529932483086, 0.11826262703450596, -0.07312740302189534, -0.061344552901182584], [4.444444444444445, -0.19333852273345192, 0.05480890662517429, 0.10757247851942256, -0.02320478350668225, -0.058309119841011975], [4.545454545454545, -0.15923586346419855, 0.06331126351926455, 0.1548810608685595, -0.005870778367591249, -0.026212736961774737], [4.646464646464646, -0.18638412109719757, 0.05054936241991536, 0.134744829776764, 0.017173838849401355, -0.03787594405489783], [4.747474747474747, -0.2134481361499876, 0.021307280909217012, 0.11770578278878399, 0.015429836082182355, -0.05549336804214389], [4.848484848484849, -0.25359300419602016, -0.005840250666253929, 0.07830871750839825, 0.016910517197328476, -0.021683372386434217], [4.94949494949495, -0.22063840569397514, 0.0013805319189096922, 0.06759532218617993, 0.011700950874976187, -0.021747330739354087], [5.05050505050505, -0.23317849028337, -0.020437385788871585, 0.06545558174475817, 0.028306580724930107, -0.03684444081595931], [5.151515151515151, -0.21553653288527494, -0.007612102638185989, 0.03813544321909029, 0.010798026912880773, -0.0616895561050413], [5.252525252525253, -0.21530370919276015, -0.021337308944241195, 0.04840432811785954, 0.0436755462366964, -0.07508986987565186], [5.353535353535354, -0.1982384026600583, -0.011348944394919534, 0.038390849153115914, 0.022956617683160558, -0.0918879347750418], [5.454545454545454, -0.19910860281663967, 0.033587113339515896, 0.017437323271715887, 0.06098479589271151, -0.10086403189328592], [5.555555555555555, -0.20157330867138865, 0.07702103775701141, 0.009085175230896147, 0.023222572409401752, -0.14506964753143659], [5.656565656565657, -0.18955755325166693, 0.03714730806145063, 0.042258794096319996, -0.01367413894988876, -0.16620517980141483], [5.757575757575758, -0.23480380518502392, 0.04117573367069991, 0.05753325723683526, -0.0010709980880194703, -0.21409896164981765], [5.858585858585858, -0.23933098926868132, 0.0861262739317328, 0.015570743042936354, -0.020155653642565875, -0.17240617451839305], [5.959595959595959, -0.20755818406547208, 0.11133061053165177, 0.03672549960744973, 0.006884172750290751, -0.12851025300126853], [6.0606060606060606, -0.21218418079793264, 0.07206227527518735, 0.04303537293064415, 0.0043247819387559824, -0.08978311872482904], [6.161616161616162, -0.24191759140877883, 0.08672968649201976, 0.0929727035756677, 0.048536416898019845, -0.05922996957741916], [6.262626262626262, -0.27770720274103317, 0.07721753241251912, 0.12350529644718981, 0.04875021832055535, -0.06950272961808288], [6.363636363636363, -0.251448522284951, 0.10877931017708022, 0.09118958092824744, 0.07964089388029744, -0.09462076544434557], [6.4646464646464645, -0.2695603542996568, 0.07048435055841454, 0.07312720608274849, 0.03079653831887242, -0.04636216110144438], [6.565656565656566, -0.2727239732542367, 0.03085167306463195, 0.029135159077759522, -0.011788140203311578, -0.08670885547216217], [6.666666666666667, -0.24799538233138418, 0.007633568573671801, 0.04886783573284762, -0.022672813365449025, -0.05423749952363422], [6.767676767676767, -0.2452905959188015, 0.008578845456738116, 0.004238269761799036, -0.054176467064426734, -0.017419997214002142], [6.8686868686868685, -0.2531293214945788, 0.043751641379381964, -0.023813779465419054, -0.06351480329536027, -0.05756952321699342], [6.96969696969697, -0.2111419940963998, 0.04432341468526896, 0.019624456631015693, -0.09217473800023179, -0.06507352486215658], [7.070707070707071, -0.20761301694753126, 0.07041057363818257, 0.007982827633323848, -0.12559578721489728, -0.07973105498158585], [7.171717171717171, -0.17104036639884185, 0.03211584481554717, 0.024591087305175223, -0.1292365717645228, -0.059663575805837955], [7.2727272727272725, -0.19064738772357048, -0.0031352559980858813, -0.01989572812274476, -0.17354350458189582, -0.04892277319296332], [7.373737373737374, -0.19733670820075824, -0.024592232986755266, -0.042674677347751086, -0.17712825410760363, -0.07510956451271225], [7.474747474747475, -0.15578641138391308, -0.019528900188660513, -0.05756640993153514, -0.12780385142457365, -0.10340594380107054], [7.575757575757575, -0.14986980390667926, 0.009410626991134853, -0.014135276956841553, -0.1503531232081407, -0.13151828392931994], [7.6767676767676765, -0.19355033276061606, -0.036874677952142075, -0.017912050135356933, -0.10489454428271527, -0.13925486661323855], [7.777777777777778, -0.2336388529371917, -0.05487491455175636, -0.03230123441675054, -0.13244167056931685, -0.1650485446389775], [7.878787878787879, -0.25196095716939015, -0.032513514296916755, 0.016223537849482855, -0.1130261058216951, -0.19542989365057156], [7.979797979797979, -0.220246542481095, -0.010437056889443127, 0.06120536271599096, -0.1333910116372773, -0.19481234782610815], [8.080808080808081, -0.2592795042924607, -0.04273367847712779, 0.0720083000189702, -0.15073385682408372, -0.18120120602653697], [8.181818181818182, -0.3047243109367145, -0.09071764618811841, 0.04024545232677595, -0.1503633143560101, -0.21475064781654427], [8.282828282828282, -0.25758349461483904, -0.13060046807828368, 0.01689719097032061, -0.19014000845944445, -0.22264696284218208], [8.383838383838384, -0.28764612595250927, -0.10434201652547372, 0.027405957741159462, -0.19638080784959805, -0.24997268337426645], [8.484848484848484, -0.320213339895706, -0.1452740029313934, 0.062150822218259245, -0.23000588676946243, -0.20126518387950182], [8.585858585858587, -0.3286319648673182, -0.13815134154940759, 0.03318012114310999, -0.2614398413875613, -0.15434768441529376], [8.686868686868687, -0.3230522034736079, -0.1183687067997613, -0.014777438963707534, -0.22202308531271708, -0.11633568425813369], [8.787878787878787, -0.336870602953267, -0.13905635769717248, -0.0394495507467411, -0.26225436457586787, -0.13663385817888435], [8.88888888888889, -0.3539204491036708, -0.11043204700742938, -0.06590622427352841, -0.30733353682936704, -0.10374093994019656], [8.98989898989899, -0.37269175561037443, -0.08795952093738282, -0.07711698344367127, -0.2723125047397964, -0.13237405012574147], [9.09090909090909, -0.38426734865793144, -0.06748987700274349, -0.0988207603704015, -0.23527062931413592, -0.1474926257500554], [9.191919191919192, -0.4303538360301218, -0.06985844303352327, -0.09696020784175012, -0.2778031248707663, -0.1534142541872889], [9.292929292929292, -0.4029239843943294, -0.1077834089867474, -0.060743295072960994, -0.24998370788738672, -0.10547914913002138], [9.393939393939394, -0.40334428735225114, -0.12200729959602938, -0.07655591007687747, -0.20744721080313144, -0.10837435572056328], [9.494949494949495, -0.40090430540334066, -0.11532177383547706, -0.029139441734493468, -0.25024992216520836, -0.12086723136781251], [9.595959595959595, -0.39085223554282533, -0.09733227739046708, -0.02375677529624281, -0.29503256637570285, -0.07634747054615115], [9.696969696969697, -0.4037250541089211, -0.09458476444464829, -0.03414364730678048, -0.2745201630883748, -0.027935286909318686], [9.797979797979798, -0.38656083207047137, -0.0883993653268611, -0.05497831726944701, -0.23277602681289325, -0.0004735886676581133], [9.8989898989899, -0.4115516619906451, -0.10705877271775582, -0.049571385639361934, -0.25750154558439814, -0.04201590572112202], [10.0, -0.3647131066875382, -0.07292799812951825, -0.06582516435464675, -0.2708152237866127, -0.020370041304541547]]}, \"id\": \"el96414543909264\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 5, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10e6cefd0>" | |
] | |
} | |
], | |
"prompt_number": 5 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## fill between test" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"\n", | |
"np.random.seed(100)\n", | |
"N_paths = 2\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 = plt.figure()\n", | |
"ax = fig.add_subplot(1,1,1)\n", | |
"\n", | |
"element = ax.fill_between(x,y.T[:,0], y.T[:,1], alpha=0.1)\n", | |
"\n", | |
"plugins.connect(fig, InteractiveLegendPlugin([[element]], ['a']))\n", | |
"\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145360315046728534949\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360315046728534949\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.30000000000000004], \"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\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536893136\", \"ydomain\": [-0.30000000000000004, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, 0.027828921544984855], [0.0, 0.0043404941790965434], [0.10101010101010101, -0.017822567311523842], [0.20202020202020202, -0.025370808236610535], [0.30303030303030304, 0.009106804995379834], [0.40404040404040403, -0.04042130938552291], [0.5050505050505051, -0.07826439730721149], [0.6060606060606061, -0.06118948883453362], [0.7070707070707071, -0.028604213324028856], [0.8080808080808081, -0.06493355435553355], [0.9090909090909091, -0.05742422141280855], [1.0101010101010102, -0.018292025981582145], [1.1111111111111112, -0.047371813769863186], [1.2121212121212122, -0.07883899181485568], [1.3131313131313131, -0.11800130276843017], [1.4141414141414141, -0.14603155350593094], [1.5151515151515151, -0.09816917503519398], [1.6161616161616161, -0.06700086012626166], [1.7171717171717171, -0.09980675885300225], [1.8181818181818181, -0.06818428398041826], [1.9191919191919191, -0.09077690927624835], [2.0202020202020203, -0.09760649090993617], [2.121212121212121, -0.053603508947698705], [2.2222222222222223, -0.021838571070025965], [2.323232323232323, -0.038227376057936094], [2.4242424242424243, -0.07068633068370242], [2.525252525252525, -0.0834031260547101], [2.6262626262626263, -0.13283427531945277], [2.727272727272727, -0.15759163997496872], [2.8282828282828283, -0.12802538912764], [2.929292929292929, -0.1764998920030061], [3.0303030303030303, -0.1666155543101568], [3.131313131313131, -0.15623510040587144], [3.2323232323232323, -0.1957203318646658], [3.3333333333333335, -0.2075259873703548], [3.4343434343434343, -0.2538783817110979], [3.5353535353535355, -0.21483722536689032], [3.6363636363636362, -0.16674513966565918], [3.7373737373737375, -0.21075094078385545], [3.8383838383838382, -0.17169634631100503], [3.9393939393939394, -0.16400619637100175], [4.040404040404041, -0.139758227461204], [4.141414141414141, -0.1267398338136664], [4.242424242424242, -0.11855561457378862], [4.343434343434343, -0.1665117013710963], [4.444444444444445, -0.19550904360381025], [4.545454545454545, -0.1910405557859455], [4.646464646464646, -0.16412903867538034], [4.747474747474747, -0.18905951576154076], [4.848484848484849, -0.21046994672085428], [4.94949494949495, -0.17523043793672366], [5.05050505050505, -0.1277297885760649], [5.151515151515151, -0.08924445922695434], [5.252525252525253, -0.10329367483326411], [5.353535353535354, -0.0934077802456894], [5.454545454545454, -0.10792821907995942], [5.555555555555555, -0.12390919754289484], [5.656565656565657, -0.15610109859231436], [5.757575757575758, -0.18233167772990932], [5.858585858585858, -0.22784544948383179], [5.959595959595959, -0.22730230652025285], [6.0606060606060606, -0.23967706109051656], [6.161616161616162, -0.2303965209929279], [6.262626262626262, -0.21740233343417817], [6.363636363636363, -0.2531423019895498], [6.4646464646464645, -0.2097581720429079], [6.565656565656566, -0.16512018396199776], [6.666666666666667, -0.1548905181889112], [6.767676767676767, -0.1661138901562481], [6.8686868686868685, -0.17979508974531314], [6.96969696969697, -0.20936056205844872], [7.070707070707071, -0.2316840559188152], [7.171717171717171, -0.2570304677984602], [7.2727272727272725, -0.28966966762443974], [7.373737373737374, -0.2430086981757074], [7.474747474747475, -0.19730743814042756], [7.575757575757575, -0.18751006970753548], [7.6767676767676765, -0.16437999440154322], [7.777777777777778, -0.1803414721177996], [7.878787878787879, -0.22113591178007574], [7.979797979797979, -0.22478610988636097], [8.080808080808081, -0.22391622056254157], [8.181818181818182, -0.2650702032622525], [8.282828282828282, -0.26226668093044775], [8.383838383838384, -0.21305087727939492], [8.484848484848484, -0.22354728410357197], [8.585858585858587, -0.23998763993171515], [8.686868686868687, -0.20944258619878717], [8.787878787878787, -0.1840076867405518], [8.88888888888889, -0.20270104258170082], [8.98989898989899, -0.1892973742854733], [9.09090909090909, -0.18525691675540165], [9.191919191919192, -0.2055775416674002], [9.292929292929292, -0.24449875154915562], [9.393939393939394, -0.2632347217615813], [9.494949494949495, -0.2675368087566547], [9.595959595959595, -0.251642801734035], [9.696969696969697, -0.2762170499522632], [9.797979797979798, -0.26210692408219305], [9.8989898989899, -0.2920945633603527], [10.0, -0.27633208280745436], [10.0, 0.19214955559113572], [10.0, 0.19214955559113572], [9.8989898989899, 0.2015614233543796], [9.797979797979798, 0.23533673147955958], [9.696969696969697, 0.19509578115476295], [9.595959595959595, 0.1717962791709637], [9.494949494949495, 0.1585770727276882], [9.393939393939394, 0.15952716753929824], [9.292929292929292, 0.11414669412253198], [9.191919191919192, 0.06800694637217142], [9.09090909090909, 0.0447308858705999], [8.98989898989899, 0.08677354197356742], [8.88888888888889, 0.11147549150859501], [8.787878787878787, 0.0809026307649165], [8.686868686868687, 0.06457492606330367], [8.585858585858587, 0.06727652700648157], [8.484848484848484, 0.03158697416598], [8.383838383838384, 0.051643172271509774], [8.282828282828282, 0.0765597702883373], [8.181818181818182, 0.0878425075054734], [8.080808080808081, 0.051844951810907085], [7.979797979797979, 0.03114060224199277], [7.878787878787879, -0.016766432306394116], [7.777777777777778, 0.019741695440366004], [7.6767676767676765, 0.047914469667550565], [7.575757575757575, 0.04589840096375824], [7.474747474747475, 0.012136826477577259], [7.373737373737374, -0.03402736389988732], [7.2727272727272725, -9.869157383355504e-07], [7.171717171717171, 0.004395107323649269], [7.070707070707071, 0.041092238386291766], [6.96969696969697, 0.07973848086442414], [6.8686868686868685, 0.05863468154337439], [6.767676767676767, 0.043131160943442146], [6.666666666666667, 0.05875720741990371], [6.565656565656566, 0.07121328266370489], [6.4646464646464645, 0.04420430537173533], [6.363636363636363, 0.02126825926879121], [6.262626262626262, -0.018639372210579916], [6.161616161616162, -0.017823663236985306], [6.0606060606060606, -0.012949525643168744], [5.959595959595959, 0.016229750337228992], [5.858585858585858, 0.034096557136347634], [5.757575757575758, 0.04812874687629401], [5.656565656565657, 0.05395796491941972], [5.555555555555555, 0.04621382763663498], [5.454545454545454, 0.06525484585996452], [5.353535353535354, 0.06656569762305217], [5.252525252525253, 0.04490708831021819], [5.151515151515151, 0.03543908142004765], [5.05050505050505, 0.04436201411751665], [4.94949494949495, 0.07539466122630169], [4.848484848484849, 0.08671011903452266], [4.747474747474747, 0.11838221897146509], [4.646464646464646, 0.11011283745647521], [4.545454545454545, 0.06021961057215401], [4.444444444444445, 0.08603360197452878], [4.343434343434343, 0.04173757748302619], [4.242424242424242, 0.0744225865021531], [4.141414141414141, 0.0720239030533218], [4.040404040404041, 0.05557575845692779], [3.9393939393939394, 0.0945709253602715], [3.8383838383838382, 0.04525918811216701], [3.7373737373737375, -0.004005035628129802], [3.6363636363636362, -0.05309431592061251], [3.5353535353535355, -0.0613287329422894], [3.4343434343434343, -0.039642768914271355], [3.3333333333333335, 0.0063573621216635665], [3.2323232323232323, 0.053702897988269375], [3.131313131313131, 0.009355188213996682], [3.0303030303030303, 0.03199889621125262], [2.929292929292929, 0.07295561739160904], [2.8282828282828283, 0.07843795450849521], [2.727272727272727, 0.07837652256419989], [2.6262626262626263, 0.09294669255356783], [2.525252525252525, 0.10265865941565361], [2.4242424242424243, 0.10344196242553862], [2.323232323232323, 0.11397193375655507], [2.2222222222222223, 0.1638320314446507], [2.121212121212121, 0.1612364378216728], [2.0202020202020203, 0.1396293387652392], [1.9191919191919191, 0.13959374909775268], [1.8181818181818181, 0.11997759261541416], [1.7171717171717171, 0.12391743050792914], [1.6161616161616161, 0.14673434559023193], [1.5151515151515151, 0.14179681942746472], [1.4141414141414141, 0.1557442943460039], [1.3131313131313131, 0.18464645247415926], [1.2121212121212122, 0.13929146748620586], [1.1111111111111112, 0.09694178496029712], [1.0101010101010102, 0.13086733010958895], [0.9090909090909091, 0.1785495164617486], [0.8080808080808081, 0.2118801033418628], [0.7070707070707071, 0.16423009064027727], [0.6060606060606061, 0.1159893076793223], [0.5050505050505051, 0.10345693190364154], [0.40404040404040403, 0.06749510233073502], [0.30303030303030304, 0.047721611579439424], [0.20202020202020202, 0.0668215767269992], [0.10101010101010101, 0.05578876140605982], [0.0, 0.027828921544984855]], [\"M\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414544056080\", \"pathtransforms\": [], \"pathcoordinates\": \"data\", \"offsetcoordinates\": \"display\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}], \"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\"}, {\"element_ids\": [[\"el96414544056080\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.0]]}, \"id\": \"el96414536031504\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360315046728534949\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.30000000000000004], \"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\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536893136\", \"ydomain\": [-0.30000000000000004, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, 0.027828921544984855], [0.0, 0.0043404941790965434], [0.10101010101010101, -0.017822567311523842], [0.20202020202020202, -0.025370808236610535], [0.30303030303030304, 0.009106804995379834], [0.40404040404040403, -0.04042130938552291], [0.5050505050505051, -0.07826439730721149], [0.6060606060606061, -0.06118948883453362], [0.7070707070707071, -0.028604213324028856], [0.8080808080808081, -0.06493355435553355], [0.9090909090909091, -0.05742422141280855], [1.0101010101010102, -0.018292025981582145], [1.1111111111111112, -0.047371813769863186], [1.2121212121212122, -0.07883899181485568], [1.3131313131313131, -0.11800130276843017], [1.4141414141414141, -0.14603155350593094], [1.5151515151515151, -0.09816917503519398], [1.6161616161616161, -0.06700086012626166], [1.7171717171717171, -0.09980675885300225], [1.8181818181818181, -0.06818428398041826], [1.9191919191919191, -0.09077690927624835], [2.0202020202020203, -0.09760649090993617], [2.121212121212121, -0.053603508947698705], [2.2222222222222223, -0.021838571070025965], [2.323232323232323, -0.038227376057936094], [2.4242424242424243, -0.07068633068370242], [2.525252525252525, -0.0834031260547101], [2.6262626262626263, -0.13283427531945277], [2.727272727272727, -0.15759163997496872], [2.8282828282828283, -0.12802538912764], [2.929292929292929, -0.1764998920030061], [3.0303030303030303, -0.1666155543101568], [3.131313131313131, -0.15623510040587144], [3.2323232323232323, -0.1957203318646658], [3.3333333333333335, -0.2075259873703548], [3.4343434343434343, -0.2538783817110979], [3.5353535353535355, -0.21483722536689032], [3.6363636363636362, -0.16674513966565918], [3.7373737373737375, -0.21075094078385545], [3.8383838383838382, -0.17169634631100503], [3.9393939393939394, -0.16400619637100175], [4.040404040404041, -0.139758227461204], [4.141414141414141, -0.1267398338136664], [4.242424242424242, -0.11855561457378862], [4.343434343434343, -0.1665117013710963], [4.444444444444445, -0.19550904360381025], [4.545454545454545, -0.1910405557859455], [4.646464646464646, -0.16412903867538034], [4.747474747474747, -0.18905951576154076], [4.848484848484849, -0.21046994672085428], [4.94949494949495, -0.17523043793672366], [5.05050505050505, -0.1277297885760649], [5.151515151515151, -0.08924445922695434], [5.252525252525253, -0.10329367483326411], [5.353535353535354, -0.0934077802456894], [5.454545454545454, -0.10792821907995942], [5.555555555555555, -0.12390919754289484], [5.656565656565657, -0.15610109859231436], [5.757575757575758, -0.18233167772990932], [5.858585858585858, -0.22784544948383179], [5.959595959595959, -0.22730230652025285], [6.0606060606060606, -0.23967706109051656], [6.161616161616162, -0.2303965209929279], [6.262626262626262, -0.21740233343417817], [6.363636363636363, -0.2531423019895498], [6.4646464646464645, -0.2097581720429079], [6.565656565656566, -0.16512018396199776], [6.666666666666667, -0.1548905181889112], [6.767676767676767, -0.1661138901562481], [6.8686868686868685, -0.17979508974531314], [6.96969696969697, -0.20936056205844872], [7.070707070707071, -0.2316840559188152], [7.171717171717171, -0.2570304677984602], [7.2727272727272725, -0.28966966762443974], [7.373737373737374, -0.2430086981757074], [7.474747474747475, -0.19730743814042756], [7.575757575757575, -0.18751006970753548], [7.6767676767676765, -0.16437999440154322], [7.777777777777778, -0.1803414721177996], [7.878787878787879, -0.22113591178007574], [7.979797979797979, -0.22478610988636097], [8.080808080808081, -0.22391622056254157], [8.181818181818182, -0.2650702032622525], [8.282828282828282, -0.26226668093044775], [8.383838383838384, -0.21305087727939492], [8.484848484848484, -0.22354728410357197], [8.585858585858587, -0.23998763993171515], [8.686868686868687, -0.20944258619878717], [8.787878787878787, -0.1840076867405518], [8.88888888888889, -0.20270104258170082], [8.98989898989899, -0.1892973742854733], [9.09090909090909, -0.18525691675540165], [9.191919191919192, -0.2055775416674002], [9.292929292929292, -0.24449875154915562], [9.393939393939394, -0.2632347217615813], [9.494949494949495, -0.2675368087566547], [9.595959595959595, -0.251642801734035], [9.696969696969697, -0.2762170499522632], [9.797979797979798, -0.26210692408219305], [9.8989898989899, -0.2920945633603527], [10.0, -0.27633208280745436], [10.0, 0.19214955559113572], [10.0, 0.19214955559113572], [9.8989898989899, 0.2015614233543796], [9.797979797979798, 0.23533673147955958], [9.696969696969697, 0.19509578115476295], [9.595959595959595, 0.1717962791709637], [9.494949494949495, 0.1585770727276882], [9.393939393939394, 0.15952716753929824], [9.292929292929292, 0.11414669412253198], [9.191919191919192, 0.06800694637217142], [9.09090909090909, 0.0447308858705999], [8.98989898989899, 0.08677354197356742], [8.88888888888889, 0.11147549150859501], [8.787878787878787, 0.0809026307649165], [8.686868686868687, 0.06457492606330367], [8.585858585858587, 0.06727652700648157], [8.484848484848484, 0.03158697416598], [8.383838383838384, 0.051643172271509774], [8.282828282828282, 0.0765597702883373], [8.181818181818182, 0.0878425075054734], [8.080808080808081, 0.051844951810907085], [7.979797979797979, 0.03114060224199277], [7.878787878787879, -0.016766432306394116], [7.777777777777778, 0.019741695440366004], [7.6767676767676765, 0.047914469667550565], [7.575757575757575, 0.04589840096375824], [7.474747474747475, 0.012136826477577259], [7.373737373737374, -0.03402736389988732], [7.2727272727272725, -9.869157383355504e-07], [7.171717171717171, 0.004395107323649269], [7.070707070707071, 0.041092238386291766], [6.96969696969697, 0.07973848086442414], [6.8686868686868685, 0.05863468154337439], [6.767676767676767, 0.043131160943442146], [6.666666666666667, 0.05875720741990371], [6.565656565656566, 0.07121328266370489], [6.4646464646464645, 0.04420430537173533], [6.363636363636363, 0.02126825926879121], [6.262626262626262, -0.018639372210579916], [6.161616161616162, -0.017823663236985306], [6.0606060606060606, -0.012949525643168744], [5.959595959595959, 0.016229750337228992], [5.858585858585858, 0.034096557136347634], [5.757575757575758, 0.04812874687629401], [5.656565656565657, 0.05395796491941972], [5.555555555555555, 0.04621382763663498], [5.454545454545454, 0.06525484585996452], [5.353535353535354, 0.06656569762305217], [5.252525252525253, 0.04490708831021819], [5.151515151515151, 0.03543908142004765], [5.05050505050505, 0.04436201411751665], [4.94949494949495, 0.07539466122630169], [4.848484848484849, 0.08671011903452266], [4.747474747474747, 0.11838221897146509], [4.646464646464646, 0.11011283745647521], [4.545454545454545, 0.06021961057215401], [4.444444444444445, 0.08603360197452878], [4.343434343434343, 0.04173757748302619], [4.242424242424242, 0.0744225865021531], [4.141414141414141, 0.0720239030533218], [4.040404040404041, 0.05557575845692779], [3.9393939393939394, 0.0945709253602715], [3.8383838383838382, 0.04525918811216701], [3.7373737373737375, -0.004005035628129802], [3.6363636363636362, -0.05309431592061251], [3.5353535353535355, -0.0613287329422894], [3.4343434343434343, -0.039642768914271355], [3.3333333333333335, 0.0063573621216635665], [3.2323232323232323, 0.053702897988269375], [3.131313131313131, 0.009355188213996682], [3.0303030303030303, 0.03199889621125262], [2.929292929292929, 0.07295561739160904], [2.8282828282828283, 0.07843795450849521], [2.727272727272727, 0.07837652256419989], [2.6262626262626263, 0.09294669255356783], [2.525252525252525, 0.10265865941565361], [2.4242424242424243, 0.10344196242553862], [2.323232323232323, 0.11397193375655507], [2.2222222222222223, 0.1638320314446507], [2.121212121212121, 0.1612364378216728], [2.0202020202020203, 0.1396293387652392], [1.9191919191919191, 0.13959374909775268], [1.8181818181818181, 0.11997759261541416], [1.7171717171717171, 0.12391743050792914], [1.6161616161616161, 0.14673434559023193], [1.5151515151515151, 0.14179681942746472], [1.4141414141414141, 0.1557442943460039], [1.3131313131313131, 0.18464645247415926], [1.2121212121212122, 0.13929146748620586], [1.1111111111111112, 0.09694178496029712], [1.0101010101010102, 0.13086733010958895], [0.9090909090909091, 0.1785495164617486], [0.8080808080808081, 0.2118801033418628], [0.7070707070707071, 0.16423009064027727], [0.6060606060606061, 0.1159893076793223], [0.5050505050505051, 0.10345693190364154], [0.40404040404040403, 0.06749510233073502], [0.30303030303030304, 0.047721611579439424], [0.20202020202020202, 0.0668215767269992], [0.10101010101010101, 0.05578876140605982], [0.0, 0.027828921544984855]], [\"M\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414544056080\", \"pathtransforms\": [], \"pathcoordinates\": \"data\", \"offsetcoordinates\": \"display\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}], \"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\"}, {\"element_ids\": [[\"el96414544056080\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.0]]}, \"id\": \"el96414536031504\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145360315046728534949\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.30000000000000004, 0.30000000000000004], \"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\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536893136\", \"ydomain\": [-0.30000000000000004, 0.30000000000000004], \"collections\": [{\"paths\": [[[[0.0, 0.027828921544984855], [0.0, 0.0043404941790965434], [0.10101010101010101, -0.017822567311523842], [0.20202020202020202, -0.025370808236610535], [0.30303030303030304, 0.009106804995379834], [0.40404040404040403, -0.04042130938552291], [0.5050505050505051, -0.07826439730721149], [0.6060606060606061, -0.06118948883453362], [0.7070707070707071, -0.028604213324028856], [0.8080808080808081, -0.06493355435553355], [0.9090909090909091, -0.05742422141280855], [1.0101010101010102, -0.018292025981582145], [1.1111111111111112, -0.047371813769863186], [1.2121212121212122, -0.07883899181485568], [1.3131313131313131, -0.11800130276843017], [1.4141414141414141, -0.14603155350593094], [1.5151515151515151, -0.09816917503519398], [1.6161616161616161, -0.06700086012626166], [1.7171717171717171, -0.09980675885300225], [1.8181818181818181, -0.06818428398041826], [1.9191919191919191, -0.09077690927624835], [2.0202020202020203, -0.09760649090993617], [2.121212121212121, -0.053603508947698705], [2.2222222222222223, -0.021838571070025965], [2.323232323232323, -0.038227376057936094], [2.4242424242424243, -0.07068633068370242], [2.525252525252525, -0.0834031260547101], [2.6262626262626263, -0.13283427531945277], [2.727272727272727, -0.15759163997496872], [2.8282828282828283, -0.12802538912764], [2.929292929292929, -0.1764998920030061], [3.0303030303030303, -0.1666155543101568], [3.131313131313131, -0.15623510040587144], [3.2323232323232323, -0.1957203318646658], [3.3333333333333335, -0.2075259873703548], [3.4343434343434343, -0.2538783817110979], [3.5353535353535355, -0.21483722536689032], [3.6363636363636362, -0.16674513966565918], [3.7373737373737375, -0.21075094078385545], [3.8383838383838382, -0.17169634631100503], [3.9393939393939394, -0.16400619637100175], [4.040404040404041, -0.139758227461204], [4.141414141414141, -0.1267398338136664], [4.242424242424242, -0.11855561457378862], [4.343434343434343, -0.1665117013710963], [4.444444444444445, -0.19550904360381025], [4.545454545454545, -0.1910405557859455], [4.646464646464646, -0.16412903867538034], [4.747474747474747, -0.18905951576154076], [4.848484848484849, -0.21046994672085428], [4.94949494949495, -0.17523043793672366], [5.05050505050505, -0.1277297885760649], [5.151515151515151, -0.08924445922695434], [5.252525252525253, -0.10329367483326411], [5.353535353535354, -0.0934077802456894], [5.454545454545454, -0.10792821907995942], [5.555555555555555, -0.12390919754289484], [5.656565656565657, -0.15610109859231436], [5.757575757575758, -0.18233167772990932], [5.858585858585858, -0.22784544948383179], [5.959595959595959, -0.22730230652025285], [6.0606060606060606, -0.23967706109051656], [6.161616161616162, -0.2303965209929279], [6.262626262626262, -0.21740233343417817], [6.363636363636363, -0.2531423019895498], [6.4646464646464645, -0.2097581720429079], [6.565656565656566, -0.16512018396199776], [6.666666666666667, -0.1548905181889112], [6.767676767676767, -0.1661138901562481], [6.8686868686868685, -0.17979508974531314], [6.96969696969697, -0.20936056205844872], [7.070707070707071, -0.2316840559188152], [7.171717171717171, -0.2570304677984602], [7.2727272727272725, -0.28966966762443974], [7.373737373737374, -0.2430086981757074], [7.474747474747475, -0.19730743814042756], [7.575757575757575, -0.18751006970753548], [7.6767676767676765, -0.16437999440154322], [7.777777777777778, -0.1803414721177996], [7.878787878787879, -0.22113591178007574], [7.979797979797979, -0.22478610988636097], [8.080808080808081, -0.22391622056254157], [8.181818181818182, -0.2650702032622525], [8.282828282828282, -0.26226668093044775], [8.383838383838384, -0.21305087727939492], [8.484848484848484, -0.22354728410357197], [8.585858585858587, -0.23998763993171515], [8.686868686868687, -0.20944258619878717], [8.787878787878787, -0.1840076867405518], [8.88888888888889, -0.20270104258170082], [8.98989898989899, -0.1892973742854733], [9.09090909090909, -0.18525691675540165], [9.191919191919192, -0.2055775416674002], [9.292929292929292, -0.24449875154915562], [9.393939393939394, -0.2632347217615813], [9.494949494949495, -0.2675368087566547], [9.595959595959595, -0.251642801734035], [9.696969696969697, -0.2762170499522632], [9.797979797979798, -0.26210692408219305], [9.8989898989899, -0.2920945633603527], [10.0, -0.27633208280745436], [10.0, 0.19214955559113572], [10.0, 0.19214955559113572], [9.8989898989899, 0.2015614233543796], [9.797979797979798, 0.23533673147955958], [9.696969696969697, 0.19509578115476295], [9.595959595959595, 0.1717962791709637], [9.494949494949495, 0.1585770727276882], [9.393939393939394, 0.15952716753929824], [9.292929292929292, 0.11414669412253198], [9.191919191919192, 0.06800694637217142], [9.09090909090909, 0.0447308858705999], [8.98989898989899, 0.08677354197356742], [8.88888888888889, 0.11147549150859501], [8.787878787878787, 0.0809026307649165], [8.686868686868687, 0.06457492606330367], [8.585858585858587, 0.06727652700648157], [8.484848484848484, 0.03158697416598], [8.383838383838384, 0.051643172271509774], [8.282828282828282, 0.0765597702883373], [8.181818181818182, 0.0878425075054734], [8.080808080808081, 0.051844951810907085], [7.979797979797979, 0.03114060224199277], [7.878787878787879, -0.016766432306394116], [7.777777777777778, 0.019741695440366004], [7.6767676767676765, 0.047914469667550565], [7.575757575757575, 0.04589840096375824], [7.474747474747475, 0.012136826477577259], [7.373737373737374, -0.03402736389988732], [7.2727272727272725, -9.869157383355504e-07], [7.171717171717171, 0.004395107323649269], [7.070707070707071, 0.041092238386291766], [6.96969696969697, 0.07973848086442414], [6.8686868686868685, 0.05863468154337439], [6.767676767676767, 0.043131160943442146], [6.666666666666667, 0.05875720741990371], [6.565656565656566, 0.07121328266370489], [6.4646464646464645, 0.04420430537173533], [6.363636363636363, 0.02126825926879121], [6.262626262626262, -0.018639372210579916], [6.161616161616162, -0.017823663236985306], [6.0606060606060606, -0.012949525643168744], [5.959595959595959, 0.016229750337228992], [5.858585858585858, 0.034096557136347634], [5.757575757575758, 0.04812874687629401], [5.656565656565657, 0.05395796491941972], [5.555555555555555, 0.04621382763663498], [5.454545454545454, 0.06525484585996452], [5.353535353535354, 0.06656569762305217], [5.252525252525253, 0.04490708831021819], [5.151515151515151, 0.03543908142004765], [5.05050505050505, 0.04436201411751665], [4.94949494949495, 0.07539466122630169], [4.848484848484849, 0.08671011903452266], [4.747474747474747, 0.11838221897146509], [4.646464646464646, 0.11011283745647521], [4.545454545454545, 0.06021961057215401], [4.444444444444445, 0.08603360197452878], [4.343434343434343, 0.04173757748302619], [4.242424242424242, 0.0744225865021531], [4.141414141414141, 0.0720239030533218], [4.040404040404041, 0.05557575845692779], [3.9393939393939394, 0.0945709253602715], [3.8383838383838382, 0.04525918811216701], [3.7373737373737375, -0.004005035628129802], [3.6363636363636362, -0.05309431592061251], [3.5353535353535355, -0.0613287329422894], [3.4343434343434343, -0.039642768914271355], [3.3333333333333335, 0.0063573621216635665], [3.2323232323232323, 0.053702897988269375], [3.131313131313131, 0.009355188213996682], [3.0303030303030303, 0.03199889621125262], [2.929292929292929, 0.07295561739160904], [2.8282828282828283, 0.07843795450849521], [2.727272727272727, 0.07837652256419989], [2.6262626262626263, 0.09294669255356783], [2.525252525252525, 0.10265865941565361], [2.4242424242424243, 0.10344196242553862], [2.323232323232323, 0.11397193375655507], [2.2222222222222223, 0.1638320314446507], [2.121212121212121, 0.1612364378216728], [2.0202020202020203, 0.1396293387652392], [1.9191919191919191, 0.13959374909775268], [1.8181818181818181, 0.11997759261541416], [1.7171717171717171, 0.12391743050792914], [1.6161616161616161, 0.14673434559023193], [1.5151515151515151, 0.14179681942746472], [1.4141414141414141, 0.1557442943460039], [1.3131313131313131, 0.18464645247415926], [1.2121212121212122, 0.13929146748620586], [1.1111111111111112, 0.09694178496029712], [1.0101010101010102, 0.13086733010958895], [0.9090909090909091, 0.1785495164617486], [0.8080808080808081, 0.2118801033418628], [0.7070707070707071, 0.16423009064027727], [0.6060606060606061, 0.1159893076793223], [0.5050505050505051, 0.10345693190364154], [0.40404040404040403, 0.06749510233073502], [0.30303030303030304, 0.047721611579439424], [0.20202020202020202, 0.0668215767269992], [0.10101010101010101, 0.05578876140605982], [0.0, 0.027828921544984855]], [\"M\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"Z\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414544056080\", \"pathtransforms\": [], \"pathcoordinates\": \"data\", \"offsetcoordinates\": \"display\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}], \"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\"}, {\"element_ids\": [[\"el96414544056080\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, 0.0]]}, \"id\": \"el96414536031504\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 6, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10e6656d0>" | |
] | |
} | |
], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## scatterplot test" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"nr_elements = 5\n", | |
"\n", | |
"fig, ax = plt.subplots()\n", | |
"elements = []\n", | |
"for i in range(nr_elements):\n", | |
" x = np.random.rand(100)\n", | |
" y = np.random.rand(100)\n", | |
" \n", | |
" element = ax.scatter(x,y, color=next(ax2._get_lines.color_cycle), alpha=0.1, marker='+')\n", | |
" elements.append([element])\n", | |
"\n", | |
"labels = [\"{}\".format(i) for i in range(nr_elements)]\n", | |
"plugins.connect(fig, InteractiveLegendPlugin(elements, labels))\n", | |
"mpld3.display()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145365718566516616349\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145365718566516616349\", {\"axes\": [{\"xlim\": [-0.20000000000000001, 1.2000000000000002], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-0.20000000000000001, 1.2000000000000002], \"ylim\": [-0.20000000000000001, 1.2000000000000002], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 9, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536113616\", \"ydomain\": [-0.20000000000000001, 1.2000000000000002], \"collections\": [{\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#BFBF00\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414543884048\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BFBF00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data02\", \"yindex\": 1, \"id\": \"el96414543955920\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#000000\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#0000FF\"], \"edgewidths\": [1.0], \"offsets\": \"data03\", \"yindex\": 1, \"id\": \"el96414543957584\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#007F00\"], \"edgewidths\": [1.0], \"offsets\": \"data04\", \"yindex\": 1, \"id\": \"el96414560425296\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#FF0000\"], \"edgewidths\": [1.0], \"offsets\": \"data05\", \"yindex\": 1, \"id\": \"el96414560426384\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}], \"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\"}, {\"element_ids\": [[\"el96414543884048\"], [\"el96414543955920\"], [\"el96414543957584\"], [\"el96414560425296\"], [\"el96414560426384\"]], \"type\": \"interactive_legend\", \"labels\": [\"0\", \"1\", \"2\", \"3\", \"4\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data04\": [[0.9588430789564042, 0.6524273028079878], [0.9110639960968554, 0.5732108771943734], [0.1196747838441613, 0.18508275660219697], [0.11446859495951, 0.6138808688662424], [0.9969650063282696, 0.07695021292315907], [0.04000832595810755, 0.6680945170106404], [0.8595637445186795, 0.23147976471742693], [0.46550503372369256, 0.2237384718444413], [0.2889983273891915, 0.07931564343308894], [0.7332639578005105, 0.5290531406613654], [0.47219244963377505, 0.292207224946918], [0.36603378202458836, 0.5347443302731564], [0.07374308587639289, 0.4966394675328142], [0.8212053023334988, 0.43871374689137466], [0.48801691478932074, 0.40966714178368036], [0.7570620648656129, 0.2606110148444858], [0.37107807260930714, 0.08937483777810629], [0.2695048247626399, 0.8066866320537381], [0.7345946354267014, 0.15657531573242267], [0.8465645262987437, 0.9139261452578302], [0.7731597126964512, 0.44666536992172634], [0.09726311997082848, 0.44940086096850873], [0.3128848054042207, 0.08179437299051329], [0.054297371248047455, 0.6964934161855384], [0.9964178644970716, 0.20657215375013938], [0.177698734352288, 0.09570310018074724], [0.37123100482185356, 0.7220107222790408], [0.3589325920964376, 0.3936551862994325], [0.23918094189867656, 0.5911130758518441], [0.19412444639857296, 0.5127646181849301], [0.7221568697894736, 0.024792440847191677], [0.9963498623999889, 0.7627946139093299], [0.6578810615587287, 0.26576180603378574], [0.18964066816521796, 0.9788268401766658], [0.7960500133787225, 0.9486860068478548], [0.6331488340440541, 0.7256699734894949], [0.05997465943644009, 0.7255050205514576], [0.45123696414113945, 0.050824790816173304], [0.3981555798526656, 0.5940661143252837], [0.4574877112189486, 0.7171266563833804], [0.17329540858703296, 0.04187295085349507], [0.5551602246692062, 0.4858483334364002], [0.675575702816968, 0.9868242589438908], [0.8264278406303862, 0.04782633490074317], [0.753975346409477, 0.5788519741372516], [0.03806626488278475, 0.07155939791943544], [0.795113651901603, 0.28014174429830796], [0.6539318070808459, 0.7018218260054466], [0.6049933023598654, 0.16232193959804986], [0.00079912648846725, 0.49228648720154566], [0.013114781463635872, 0.9545457112974848], [0.14710484933761359, 0.5893551623652425], [0.26562391867980684, 0.6066268202107414], [0.06049450827851821, 0.8679865440385066], [0.2578656308496723, 0.9365479368445849], [0.22906133301836384, 0.14416045993162074], [0.8240837710969812, 0.2770071902007831], [0.20185448655187266, 0.12532193725528784], [0.881092325628702, 0.884720788157515], [0.21436450568575982, 0.8267377704644704], [0.09124750057287223, 0.9953588810927804], [0.7458057935231055, 0.8138696157910104], [0.5043400350526346, 0.11914570059659024], [0.5862020432833676, 0.9315367835142864], [0.36415611319487795, 0.006986692731106969], [0.5532539595411161, 0.5383962494524664], [0.8128446991062696, 0.7825015421974374], [0.14007325741439247, 0.8888692517279119], [0.26762510211969903, 0.30537562757152403], [0.7395485502578282, 0.6446775039355818], [0.273796078111771, 0.12491934664885951], [0.5968614644069085, 0.608584300362758], [0.33862246805035456, 0.18949843940084687], [0.07160379461501021, 0.4390658193797916], [0.49859687569685474, 0.9704126030213763], [0.7144913096107074, 0.06809275523457425], [0.9906342627731619, 0.2051728622611535], [0.30616421419444173, 0.5075719409410157], [0.43181899369392907, 0.14050011761810988], [0.5481835598658806, 0.9337383557266488], [0.5922789121550232, 0.6065454317067481], [0.10793438223331675, 0.46153152916886886], [0.7218030237835277, 0.8015021709095485], [0.28781493382595613, 0.6987073120764528], [0.7101954909298428, 0.7445573429189948], [0.26491733998837474, 0.32516377858166023], [0.32929177720525493, 0.17845078715926477], [0.15393928318285965, 0.014351502625561174], [0.30573627751887034, 0.10704972728076023], [0.767593568436209, 0.2730517009310389], [0.5738480440000739, 0.6165217754396433], [0.9717102350944524, 0.9475792237640892], [0.6918493680668857, 0.9064723688429247], [0.49136225796249566, 0.965094028213592], [0.4189538130977012, 0.33762107364119875], [0.9528784220570516, 0.6564030876691848], [0.14422252170336136, 0.291455780992926], [0.5212103058543409, 0.15086922353097754], [0.8891494541942766, 0.036932063464012566], [0.7243161529127102, 0.5979637425112644]], \"data05\": [[0.027732277525769122, 0.7326035042447868], [0.38223726411047276, 0.3662981200304196], [0.953250912037412, 0.07446874484611776], [0.22219852722772315, 0.19520093883369538], [0.3051261201740513, 0.9749543589033207], [0.8193198019179616, 0.5042012781591255], [0.5784698159078305, 0.9856369123402908], [0.027617184503319403, 0.334422581623805], [0.9543877717509077, 0.86694362905042], [0.31213882462326004, 0.28202920165468537], [0.18407287867767852, 0.4885436412125148], [0.016469626666622994, 0.5561720792318058], [0.5240609701557668, 0.812180581360391], [0.1669567665617232, 0.8528719503750717], [0.8129420468290551, 0.4933303107049156], [0.002833802567491883, 0.9592919689890541], [0.09923761951162091, 0.15876446829484048], [0.4233708029190698, 0.03595437830372339], [0.005809099357757863, 0.4064802430234328], [0.6439284323771901, 0.34281852029003423], [0.5258895714533903, 0.2758183089465416], [0.2490888842079948, 0.5726782675403487], [0.2711950546864559, 0.6694290959505409], [0.058806340020986836, 0.9043172319742855], [0.9601897819139968, 0.8639552899987842], [0.16091193476589405, 0.746258835174717], [0.7945575900083599, 0.9492467284607887], [0.41541396961113675, 0.468747178954116], [0.1296549158742949, 0.5701748164979206], [0.05663718070504464, 0.14759840951683112], [0.19695621838288735, 0.09653126310157434], [0.04679972200788496, 0.9838887736072565], [0.902222208240269, 0.9458575454453456], [0.8373716439277921, 0.9288750130436264], [0.4782820685984708, 0.9869588615998884], [0.12772435899875278, 0.8094706569653018], [0.3407632394872363, 0.1140920029082878], [0.46090247442919585, 0.5407398333085283], [0.17987906200264803, 0.6819381025437358], [0.5210110938516268, 0.4830458673119201], [0.7694249110707195, 0.004595190708636343], [0.7472272782341517, 0.8572907370223923], [0.8646791692914033, 0.23395180665149862], [0.7641218393814242, 0.6112923842303966], [0.8525234424576078, 0.6823449232001844], [0.2678974353482877, 0.3019335919896844], [0.7291903264982751, 0.5972929760556739], [0.6876453619109382, 0.3909920066291014], [0.35088076292166537, 0.5554582470745515], [0.629399160560595, 0.1033241162198455], [0.39055618282314364, 0.029660839697256525], [0.5144285940785093, 0.33356079941615535], [0.30396353564287937, 0.5554181190642097], [0.796999760528667, 0.5118634831863179], [0.1078230751698096, 0.5902068697566979], [0.747514681460955, 0.645462711355599], [0.9669085740081871, 0.4984087925270697], [0.15715650744429033, 0.35312914266820894], [0.8728958517621116, 0.3880098002267456], [0.7144418335142413, 0.8037323056232524], [0.3493239230792018, 0.5179470332325185], [0.1880779700571047, 0.6583970857505594], [0.8916780035328351, 0.08820184374051021], [0.345322979056069, 0.4723690419759815], [0.20544091259836594, 0.9010194296302003], [0.10939673778824666, 0.4459973271210179], [0.6899335017791751, 0.14448085597899885], [0.03433567998445264, 0.06380619591282344], [0.4797710800309031, 0.19612708867628437], [0.518306674989326, 0.9185279393141138], [0.5591845358793935, 0.694884446482893], [0.956846570030116, 0.03056749698032979], [0.772936672798466, 0.06791435244989796], [0.7233024985247449, 0.43617104714271937], [0.8783149241161254, 0.6090955817303455], [0.9657986414149771, 0.676250271780259], [0.3397007022845787, 0.8371891425391603], [0.7268852163083745, 0.23862618241982758], [0.6262387503008751, 0.24913496546619573], [0.8093780377555375, 0.052347175321606154], [0.8314790236531127, 0.8472404043737314], [0.9229724002354529, 0.2415222455550552], [0.8141044732498339, 0.07540841951641519], [0.28506368515962255, 0.9165669493642231], [0.6058657432561324, 0.4733851293003041], [0.26099723471697966, 0.08418607219698104], [0.8146459943707198, 0.3636516664196304], [0.46446744385825733, 0.5805528232392523], [0.2732828358110101, 0.17429071474182234], [0.13449313291469356, 0.17666784836273353], [0.1447138451653326, 0.34412769179470815], [0.19670375571606524, 0.3213995357532248], [0.4978025146393892, 0.4309950595248051], [0.20619006742896495, 0.3124940335097408], [0.7673694729405008, 0.4727755088550235], [0.2566315513368608, 0.5423789698700843], [0.2626287020702287, 0.9645954235922461], [0.6426574367170579, 0.5054182909725616], [0.995231024299065, 0.0465058802370133], [0.5425098909424161, 0.34182506172610416]], \"data02\": [[0.06066969591495719, 0.5525294234343233], [0.9498369391498449, 0.16112709705428085], [0.6086590451398208, 0.568548964618283], [0.6720026837921436, 0.4857098681067773], [0.4627735236945656, 0.12751954351366868], [0.7042730952349673, 0.5436921692300374], [0.18106714116610723, 0.20049060873265778], [0.6475821773323257, 0.6701608599998026], [0.5681087348454958, 0.5581122170361856], [0.9541383145344952, 0.2323783174916082], [0.7966902388813616, 0.5155884856098234], [0.5853103927119501, 0.3149919734186799], [0.4553549670732038, 0.8465925489214037], [0.7384515305314945, 0.44737628027740306], [0.8122362779627881, 0.10008522439470402], [0.9272911735521501, 0.9015920853941103], [0.8263756067215121, 0.8560882485516653], [0.029956597665086293, 0.2863298739118133], [0.7728028218089087, 0.25901477045356636], [0.5217773936163203, 0.06637137355819867], [0.885387332241226, 0.3176316716278835], [0.45856166708365387, 0.05184299524331337], [0.5407225761596202, 0.9441883178319019], [0.9077649982654136, 0.7172173020432209], [0.5563100402768733, 0.553659200161456], [0.18711472229064618, 0.35974476987985604], [0.6811113675419537, 0.15918230108432907], [0.013846685418091642, 0.43295804116479997], [0.38009165785093446, 0.2793621769098912], [0.8086844901333918, 0.9610376321653145], [0.5761254124118753, 0.09813215580838908], [0.15178450453000336, 0.40699555242514285], [0.32985476037950434, 0.008376446001807092], [0.9517731461483258, 0.5680589295963213], [0.0303847229992098, 0.5766097683672401], [0.7781735271559485, 0.1371442613273378], [0.1813838598387736, 0.6722185660414206], [0.21365686845063014, 0.1428737274580416], [0.6525962229220905, 0.5092314972536864], [0.14409194606082942, 0.36876195253012645], [0.3810072706070531, 0.2491073893585356], [0.4057345325726489, 0.13628212203334145], [0.6589654345726036, 0.11929113212325759], [0.5118226737134436, 0.05238812645692448], [0.4825851038502419, 0.4348993146930489], [0.5240217982839889, 0.7707053805867863], [0.8062858732427213, 0.8509141823068277], [0.8043910806692938, 0.6212826674295909], [0.14770043610250894, 0.37988768839810483], [0.9934535770806974, 0.6799110364172396], [0.067767735751191, 0.3137655042597186], [0.9958158069623947, 0.726637982999317], [0.12344969265330885, 0.9144831910873826], [0.06192919793340079, 0.094895480739556], [0.7040354417782194, 0.6649769518322519], [0.9609796529778833, 0.35687279405119077], [0.712150947902339, 0.7622909202623359], [0.6630813223207347, 0.9450056911510231], [0.13367496222456432, 0.22374220285139934], [0.1803451692283481, 0.05725321925421012], [0.15671586892228329, 0.6428018502331379], [0.0904734812788307, 0.0887771085528527], [0.9718661482450326, 0.6679384149986543], [0.5098611302849001, 0.6072213851311274], [0.4508774763010518, 0.01959981977284353], [0.3297009784972129, 0.3937933443577386], [0.49351204204947463, 0.4595073026861176], [0.14360098508058272, 0.021136011560755397], [0.1509202908404773, 0.37369090134501737], [0.8153385794598776, 0.5655671369760998], [0.2112818837963617, 0.00887517698156215], [0.08654232235729176, 0.16284534638833636], [0.38725741753121723, 0.8981317369729009], [0.8934034140221164, 0.35543331858117866], [0.4286432979428625, 0.3097535151674734], [0.7663040121802115, 0.5821566782631048], [0.9952654020174069, 0.5221646219283154], [0.020062850895111617, 0.8824557693517251], [0.10819822866909212, 0.2723444648400082], [0.69474267149362, 0.2998200567828857], [0.8906640504565513, 0.3083867067948075], [0.4924763237765829, 0.10100427170620596], [0.07026799039549492, 0.29502169857893545], [0.08843736434987892, 0.7289047920416258], [0.10620815853048937, 0.34187889271524396], [0.20125887824678435, 0.2860681555183966], [0.8773640053306407, 0.9563476061071962], [0.9432225022019286, 0.9994791511322937], [0.13563613798031937, 0.3373519213932864], [0.8587269726838475, 0.4751215567999363], [0.7571582824355558, 0.8296496599906129], [0.6861716144556532, 0.09940514628180974], [0.8563933901602275, 0.50811464169943], [0.23087775291356172, 0.8338365663554891], [0.5193379792114721, 0.7701229934134927], [0.3433334451764454, 0.8160003497549749], [0.6587729293586823, 0.051549976415450005], [0.28279025386662415, 0.6813237878724938], [0.502466433756727, 0.9632936328077967], [0.30327751955275506, 0.7009474565722479]], \"data03\": [[0.4098464718143954, 0.0886254141339946], [0.2070405888350909, 0.9832503769165538], [0.9560226669224692, 0.479242981871837], [0.40601117716635504, 0.4821670204872105], [0.716880130904611, 0.5265454160436102], [0.6723314084399745, 0.9430743268241158], [0.8421371025537246, 0.4907038517169977], [0.940740392297392, 0.030130396160569006], [0.4698011067009591, 0.9354703428207063], [0.10771652388871167, 0.7472800008826406], [0.5666853987413368, 0.7304114921128106], [0.9797770299024345, 0.10528115445790953], [0.4339147015301905, 0.7656025630259959], [0.8180344364829785, 0.7078790446085943], [0.43724959672412667, 0.9225381437161363], [0.8105342992752003, 0.5090713624505511], [0.22960846580858452, 0.7121099683829537], [0.4109781451687913, 0.8710483215307725], [0.7309511398181268, 0.43066181495719147], [0.6373144062380719, 0.48712869117962754], [0.7691426808213709, 0.12223180018508994], [0.9562240422458972, 0.1900160836371645], [0.3760066618461234, 0.5997405304143875], [0.8957014217970638, 0.2980776286541513], [0.20848049565757376, 0.18268336777640204], [0.06319643998308144, 0.5030276903035737], [0.2394216729185552, 0.9506696371583517], [0.7801992488254825, 0.2325800919586698], [0.3760754415175315, 0.7390820442705245], [0.5814837295524542, 0.7616713142711553], [0.2417021356737692, 0.7660564796818717], [0.4385545867531734, 0.9244958016032567], [0.18045227317063817, 0.3228087260890464], [0.37312046783579444, 0.6789428837728861], [0.8639333907383302, 0.1718199895762833], [0.8559936753056242, 0.7095739437934471], [0.940079549566491, 0.4893233847660068], [0.4057399896621089, 0.441921269249274], [0.9823102135057693, 0.6465757977985269], [0.4826039437830758, 0.4784335817739622], [0.8771207824694917, 0.7809835653732088], [0.4088792202469834, 0.5637844595472824], [0.31977322627438365, 0.8491603722968005], [0.6424685981654128, 0.3324874926307865], [0.7093654458159975, 0.6876383457298232], [0.7423468167300954, 0.31032585761982945], [0.604514627149687, 0.6607954615137971], [0.8584415473916255, 0.35447467775251196], [0.6499068382880037, 0.061312486142167555], [0.270485889197416, 0.44390848519873516], [0.8584748656310555, 0.7083258497660975], [0.1808249680067895, 0.2574186578134675], [0.5377051151480724, 0.6183630278806319], [0.38692991753348105, 0.12162527851495386], [0.6195852092738365, 0.6373243081047304], [0.5485863059731005, 0.05829174691838146], [0.46389401201881464, 0.04762410122741678], [0.8264448382313554, 0.511944559203932], [0.40099782742517387, 0.29931499088474944], [0.6195032797683993, 0.34643613534056983], [0.5007091183337946, 0.6492174346036962], [0.5008895041536758, 0.9488882701086157], [0.6089031038167406, 0.5162418791778752], [0.9953652409958986, 0.7135434407602232], [0.24794951921663877, 0.5861612487888144], [0.7384334058920138, 0.39493583813539335], [0.9300439181805716, 0.671816525290099], [0.5844120756954285, 0.23717057627672355], [0.8806471520789401, 0.8482091462350475], [0.6920591198056676, 0.2924731670105124], [0.35141827940417747, 0.12065632604964383], [0.8206994508517493, 0.4311841945956453], [0.2370849611913043, 0.2719515607303118], [0.9216936684824427, 0.2737262760819733], [0.9188489045540845, 0.6422025693611261], [0.6295307118357462, 0.44991232849801055], [0.5122231170341107, 0.9084847728691557], [0.29985152129987824, 0.7753971680607056], [0.4510620990884934, 0.33911251996550873], [0.7171435833472242, 0.7037406503612524], [0.2897107697174295, 0.23911862145194263], [0.20884415472966478, 0.20516107579979725], [0.31653691874943835, 0.6839686008379533], [0.5732346168518381, 0.41669528896656205], [0.46252622730189574, 0.19521144746509556], [0.5026185641627156, 0.3903295752782401], [0.4872415437421902, 0.09852342315710272], [0.779227269647643, 0.32254437988658846], [0.39013589036969454, 0.8894781356759724], [0.7685351778741765, 0.9422719149629099], [0.8614682627614487, 0.6574707574441057], [0.15345044177087064, 0.1956287488018773], [0.6153544991431779, 0.5256787607410369], [0.5132315524167129, 0.3108091040925598], [0.9892656389217689, 0.5553483943313786], [0.08282528798350319, 0.5355298073676616], [0.7114699262161587, 0.4651129288983915], [0.27315441706016785, 0.7678645943333149], [0.9949414263945612, 0.8869469716865482], [0.35472791394445913, 0.8298093684181447]], \"data01\": [[0.41709073558366083, 0.009933693670982957], [0.6955910282920739, 0.7897656793360066], [0.4248472379248316, 0.27531321879489834], [0.8581142260514297, 0.7177400045433364], [0.846932479609419, 0.4213559217565558], [0.07019911390868883, 0.14333587216899957], [0.3017524134841485, 0.19252168025197935], [0.9796236810301702, 0.3138152333176353], [0.035626996553034807, 0.8051701673672972], [0.4923926469985821, 0.012625830357479995], [0.9523768530135464, 0.0491059726975559], [0.8105737585294711, 0.5660003849850935], [0.2943304412963712, 0.686810696154396], [0.5962335185183412, 0.7268109050517068], [0.43117785229972994, 0.47969376130167696], [0.5923975029889863, 0.3676567217785285], [0.893752104720206, 0.8399700992017514], [0.5540211897717062, 0.45416355245100537], [0.4928665073452738, 0.3213658387821987], [0.3192704571895012, 0.09271986717104153], [0.263365783050724, 0.06043793213558557], [0.5422806135357958, 0.09095116720087482], [0.08226452393202399, 0.6827064564283071], [0.6356367098253985, 0.6807357672306377], [0.7964052251862078, 0.24317416588742535], [0.9547475054308089, 0.6404614421560298], [0.6846242716927129, 0.06913918311155143], [0.48829316680509927, 0.8729199617462652], [0.4854143101843673, 0.10960694983251273], [0.9666929205829677, 0.16905576511943454], [0.21134788749712163, 0.46737799144534753], [0.41164813817783297, 0.7759492194033726], [0.9896655767792834, 0.8544445157050565], [0.02841185671325175, 0.21038644476715873], [0.7013265140935161, 0.07664186926890304], [0.0251715638848119, 0.788914797103218], [0.3208817260865362, 0.5475000011493021], [0.07352706186557412, 0.7862548628154125], [0.06088456434663547, 0.9200470428587104], [0.11140631670405321, 0.4809727659278811], [0.16926890814543094, 0.459553670010184], [0.627686279501054, 0.5989791554809532], [0.43839309463984333, 0.5993187807242845], [0.8309037646039747, 0.5043734512337575], [0.23979218956447224, 0.30687852974345065], [0.19005270791973705, 0.5413529803491126], [0.7118996585829157, 0.9249269434027916], [0.8582949253267775, 0.9705508020302188], [0.5590558855960195, 0.39579460989699644], [0.7044204082888571, 0.7987452725553391], [0.605112035518179, 0.6350881477509265], [0.5592172832680401, 0.2299691652490331], [0.8603941909075867, 0.05120709286293723], [0.9197553591500698, 0.028463806171351802], [0.8496073257589813, 0.1228477519037694], [0.2544665354944545, 0.2202125178336386], [0.8775555422867709, 0.8290227537008228], [0.43513019009222575, 0.28549182770003945], [0.729494343964508, 0.7810640826310915], [0.4126407675387943, 0.5046658125966791], [0.1908360458112225, 0.1384489237765847], [0.7060195199561622, 0.778036552333978], [0.24063282092985294, 0.9213317935208427], [0.8513244268329954, 0.9430186320361914], [0.8241022892585868, 0.7044357972639433], [0.5252117866139705, 0.6939164454759088], [0.3863407943061684, 0.546551813367495], [0.5908807907349247, 0.36921722973788307], [0.13752361490782572, 0.982467574726993], [0.8082704078916083, 0.0656092254275048], [0.965825815244485, 0.8976783107422656], [0.7797958042329348, 0.26393098909487067], [0.23933508209581977, 0.5744758420233385], [0.8672604131084306, 0.5128662680937877], [0.8081150128937004, 0.554476808071934], [0.06368112422046845, 0.6471673318283991], [0.231228304048803, 0.1854741590544805], [0.5896854487035268, 0.27197820430902153], [0.13748694797777417, 0.14843865774278353], [0.6784407043714858, 0.030304170594405044], [0.9921906895152471, 0.9392555841521393], [0.28575198481557174, 0.34675413017620393], [0.7609127595588501, 0.10956460430560977], [0.046527167666138625, 0.3783269956614701], [0.33253590652220666, 0.38407945904141416], [0.9445527910270574, 0.6654236879194613], [0.6365170412547786, 0.24449092930615968], [0.6018486061318925, 0.661480973773685], [0.9281846814636464, 0.09849288379186216], [0.18167941079661343, 0.5808627476668515], [0.017823184026521055, 0.10686550466855071], [0.1900721761341725, 0.5482545074639875], [0.5218717978245897, 0.5197517077112073], [0.49582198590367044, 0.2962341178657576], [0.8004912055691525, 0.45572905099809846], [0.8594363114449111, 0.03866652012956684], [0.21295603224034498, 0.5990030248885009], [0.43726884144766365, 0.0004867594752598903], [0.42161750906258955, 0.5018135936855311], [0.0547173770819418, 0.5017261216916143]]}, \"id\": \"el96414536571856\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145365718566516616349\", {\"axes\": [{\"xlim\": [-0.20000000000000001, 1.2000000000000002], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-0.20000000000000001, 1.2000000000000002], \"ylim\": [-0.20000000000000001, 1.2000000000000002], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 9, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536113616\", \"ydomain\": [-0.20000000000000001, 1.2000000000000002], \"collections\": [{\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#BFBF00\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414543884048\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BFBF00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data02\", \"yindex\": 1, \"id\": \"el96414543955920\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#000000\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#0000FF\"], \"edgewidths\": [1.0], \"offsets\": \"data03\", \"yindex\": 1, \"id\": \"el96414543957584\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#007F00\"], \"edgewidths\": [1.0], \"offsets\": \"data04\", \"yindex\": 1, \"id\": \"el96414560425296\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#FF0000\"], \"edgewidths\": [1.0], \"offsets\": \"data05\", \"yindex\": 1, \"id\": \"el96414560426384\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}], \"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\"}, {\"element_ids\": [[\"el96414543884048\"], [\"el96414543955920\"], [\"el96414543957584\"], [\"el96414560425296\"], [\"el96414560426384\"]], \"type\": \"interactive_legend\", \"labels\": [\"0\", \"1\", \"2\", \"3\", \"4\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data04\": [[0.9588430789564042, 0.6524273028079878], [0.9110639960968554, 0.5732108771943734], [0.1196747838441613, 0.18508275660219697], [0.11446859495951, 0.6138808688662424], [0.9969650063282696, 0.07695021292315907], [0.04000832595810755, 0.6680945170106404], [0.8595637445186795, 0.23147976471742693], [0.46550503372369256, 0.2237384718444413], [0.2889983273891915, 0.07931564343308894], [0.7332639578005105, 0.5290531406613654], [0.47219244963377505, 0.292207224946918], [0.36603378202458836, 0.5347443302731564], [0.07374308587639289, 0.4966394675328142], [0.8212053023334988, 0.43871374689137466], [0.48801691478932074, 0.40966714178368036], [0.7570620648656129, 0.2606110148444858], [0.37107807260930714, 0.08937483777810629], [0.2695048247626399, 0.8066866320537381], [0.7345946354267014, 0.15657531573242267], [0.8465645262987437, 0.9139261452578302], [0.7731597126964512, 0.44666536992172634], [0.09726311997082848, 0.44940086096850873], [0.3128848054042207, 0.08179437299051329], [0.054297371248047455, 0.6964934161855384], [0.9964178644970716, 0.20657215375013938], [0.177698734352288, 0.09570310018074724], [0.37123100482185356, 0.7220107222790408], [0.3589325920964376, 0.3936551862994325], [0.23918094189867656, 0.5911130758518441], [0.19412444639857296, 0.5127646181849301], [0.7221568697894736, 0.024792440847191677], [0.9963498623999889, 0.7627946139093299], [0.6578810615587287, 0.26576180603378574], [0.18964066816521796, 0.9788268401766658], [0.7960500133787225, 0.9486860068478548], [0.6331488340440541, 0.7256699734894949], [0.05997465943644009, 0.7255050205514576], [0.45123696414113945, 0.050824790816173304], [0.3981555798526656, 0.5940661143252837], [0.4574877112189486, 0.7171266563833804], [0.17329540858703296, 0.04187295085349507], [0.5551602246692062, 0.4858483334364002], [0.675575702816968, 0.9868242589438908], [0.8264278406303862, 0.04782633490074317], [0.753975346409477, 0.5788519741372516], [0.03806626488278475, 0.07155939791943544], [0.795113651901603, 0.28014174429830796], [0.6539318070808459, 0.7018218260054466], [0.6049933023598654, 0.16232193959804986], [0.00079912648846725, 0.49228648720154566], [0.013114781463635872, 0.9545457112974848], [0.14710484933761359, 0.5893551623652425], [0.26562391867980684, 0.6066268202107414], [0.06049450827851821, 0.8679865440385066], [0.2578656308496723, 0.9365479368445849], [0.22906133301836384, 0.14416045993162074], [0.8240837710969812, 0.2770071902007831], [0.20185448655187266, 0.12532193725528784], [0.881092325628702, 0.884720788157515], [0.21436450568575982, 0.8267377704644704], [0.09124750057287223, 0.9953588810927804], [0.7458057935231055, 0.8138696157910104], [0.5043400350526346, 0.11914570059659024], [0.5862020432833676, 0.9315367835142864], [0.36415611319487795, 0.006986692731106969], [0.5532539595411161, 0.5383962494524664], [0.8128446991062696, 0.7825015421974374], [0.14007325741439247, 0.8888692517279119], [0.26762510211969903, 0.30537562757152403], [0.7395485502578282, 0.6446775039355818], [0.273796078111771, 0.12491934664885951], [0.5968614644069085, 0.608584300362758], [0.33862246805035456, 0.18949843940084687], [0.07160379461501021, 0.4390658193797916], [0.49859687569685474, 0.9704126030213763], [0.7144913096107074, 0.06809275523457425], [0.9906342627731619, 0.2051728622611535], [0.30616421419444173, 0.5075719409410157], [0.43181899369392907, 0.14050011761810988], [0.5481835598658806, 0.9337383557266488], [0.5922789121550232, 0.6065454317067481], [0.10793438223331675, 0.46153152916886886], [0.7218030237835277, 0.8015021709095485], [0.28781493382595613, 0.6987073120764528], [0.7101954909298428, 0.7445573429189948], [0.26491733998837474, 0.32516377858166023], [0.32929177720525493, 0.17845078715926477], [0.15393928318285965, 0.014351502625561174], [0.30573627751887034, 0.10704972728076023], [0.767593568436209, 0.2730517009310389], [0.5738480440000739, 0.6165217754396433], [0.9717102350944524, 0.9475792237640892], [0.6918493680668857, 0.9064723688429247], [0.49136225796249566, 0.965094028213592], [0.4189538130977012, 0.33762107364119875], [0.9528784220570516, 0.6564030876691848], [0.14422252170336136, 0.291455780992926], [0.5212103058543409, 0.15086922353097754], [0.8891494541942766, 0.036932063464012566], [0.7243161529127102, 0.5979637425112644]], \"data05\": [[0.027732277525769122, 0.7326035042447868], [0.38223726411047276, 0.3662981200304196], [0.953250912037412, 0.07446874484611776], [0.22219852722772315, 0.19520093883369538], [0.3051261201740513, 0.9749543589033207], [0.8193198019179616, 0.5042012781591255], [0.5784698159078305, 0.9856369123402908], [0.027617184503319403, 0.334422581623805], [0.9543877717509077, 0.86694362905042], [0.31213882462326004, 0.28202920165468537], [0.18407287867767852, 0.4885436412125148], [0.016469626666622994, 0.5561720792318058], [0.5240609701557668, 0.812180581360391], [0.1669567665617232, 0.8528719503750717], [0.8129420468290551, 0.4933303107049156], [0.002833802567491883, 0.9592919689890541], [0.09923761951162091, 0.15876446829484048], [0.4233708029190698, 0.03595437830372339], [0.005809099357757863, 0.4064802430234328], [0.6439284323771901, 0.34281852029003423], [0.5258895714533903, 0.2758183089465416], [0.2490888842079948, 0.5726782675403487], [0.2711950546864559, 0.6694290959505409], [0.058806340020986836, 0.9043172319742855], [0.9601897819139968, 0.8639552899987842], [0.16091193476589405, 0.746258835174717], [0.7945575900083599, 0.9492467284607887], [0.41541396961113675, 0.468747178954116], [0.1296549158742949, 0.5701748164979206], [0.05663718070504464, 0.14759840951683112], [0.19695621838288735, 0.09653126310157434], [0.04679972200788496, 0.9838887736072565], [0.902222208240269, 0.9458575454453456], [0.8373716439277921, 0.9288750130436264], [0.4782820685984708, 0.9869588615998884], [0.12772435899875278, 0.8094706569653018], [0.3407632394872363, 0.1140920029082878], [0.46090247442919585, 0.5407398333085283], [0.17987906200264803, 0.6819381025437358], [0.5210110938516268, 0.4830458673119201], [0.7694249110707195, 0.004595190708636343], [0.7472272782341517, 0.8572907370223923], [0.8646791692914033, 0.23395180665149862], [0.7641218393814242, 0.6112923842303966], [0.8525234424576078, 0.6823449232001844], [0.2678974353482877, 0.3019335919896844], [0.7291903264982751, 0.5972929760556739], [0.6876453619109382, 0.3909920066291014], [0.35088076292166537, 0.5554582470745515], [0.629399160560595, 0.1033241162198455], [0.39055618282314364, 0.029660839697256525], [0.5144285940785093, 0.33356079941615535], [0.30396353564287937, 0.5554181190642097], [0.796999760528667, 0.5118634831863179], [0.1078230751698096, 0.5902068697566979], [0.747514681460955, 0.645462711355599], [0.9669085740081871, 0.4984087925270697], [0.15715650744429033, 0.35312914266820894], [0.8728958517621116, 0.3880098002267456], [0.7144418335142413, 0.8037323056232524], [0.3493239230792018, 0.5179470332325185], [0.1880779700571047, 0.6583970857505594], [0.8916780035328351, 0.08820184374051021], [0.345322979056069, 0.4723690419759815], [0.20544091259836594, 0.9010194296302003], [0.10939673778824666, 0.4459973271210179], [0.6899335017791751, 0.14448085597899885], [0.03433567998445264, 0.06380619591282344], [0.4797710800309031, 0.19612708867628437], [0.518306674989326, 0.9185279393141138], [0.5591845358793935, 0.694884446482893], [0.956846570030116, 0.03056749698032979], [0.772936672798466, 0.06791435244989796], [0.7233024985247449, 0.43617104714271937], [0.8783149241161254, 0.6090955817303455], [0.9657986414149771, 0.676250271780259], [0.3397007022845787, 0.8371891425391603], [0.7268852163083745, 0.23862618241982758], [0.6262387503008751, 0.24913496546619573], [0.8093780377555375, 0.052347175321606154], [0.8314790236531127, 0.8472404043737314], [0.9229724002354529, 0.2415222455550552], [0.8141044732498339, 0.07540841951641519], [0.28506368515962255, 0.9165669493642231], [0.6058657432561324, 0.4733851293003041], [0.26099723471697966, 0.08418607219698104], [0.8146459943707198, 0.3636516664196304], [0.46446744385825733, 0.5805528232392523], [0.2732828358110101, 0.17429071474182234], [0.13449313291469356, 0.17666784836273353], [0.1447138451653326, 0.34412769179470815], [0.19670375571606524, 0.3213995357532248], [0.4978025146393892, 0.4309950595248051], [0.20619006742896495, 0.3124940335097408], [0.7673694729405008, 0.4727755088550235], [0.2566315513368608, 0.5423789698700843], [0.2626287020702287, 0.9645954235922461], [0.6426574367170579, 0.5054182909725616], [0.995231024299065, 0.0465058802370133], [0.5425098909424161, 0.34182506172610416]], \"data02\": [[0.06066969591495719, 0.5525294234343233], [0.9498369391498449, 0.16112709705428085], [0.6086590451398208, 0.568548964618283], [0.6720026837921436, 0.4857098681067773], [0.4627735236945656, 0.12751954351366868], [0.7042730952349673, 0.5436921692300374], [0.18106714116610723, 0.20049060873265778], [0.6475821773323257, 0.6701608599998026], [0.5681087348454958, 0.5581122170361856], [0.9541383145344952, 0.2323783174916082], [0.7966902388813616, 0.5155884856098234], [0.5853103927119501, 0.3149919734186799], [0.4553549670732038, 0.8465925489214037], [0.7384515305314945, 0.44737628027740306], [0.8122362779627881, 0.10008522439470402], [0.9272911735521501, 0.9015920853941103], [0.8263756067215121, 0.8560882485516653], [0.029956597665086293, 0.2863298739118133], [0.7728028218089087, 0.25901477045356636], [0.5217773936163203, 0.06637137355819867], [0.885387332241226, 0.3176316716278835], [0.45856166708365387, 0.05184299524331337], [0.5407225761596202, 0.9441883178319019], [0.9077649982654136, 0.7172173020432209], [0.5563100402768733, 0.553659200161456], [0.18711472229064618, 0.35974476987985604], [0.6811113675419537, 0.15918230108432907], [0.013846685418091642, 0.43295804116479997], [0.38009165785093446, 0.2793621769098912], [0.8086844901333918, 0.9610376321653145], [0.5761254124118753, 0.09813215580838908], [0.15178450453000336, 0.40699555242514285], [0.32985476037950434, 0.008376446001807092], [0.9517731461483258, 0.5680589295963213], [0.0303847229992098, 0.5766097683672401], [0.7781735271559485, 0.1371442613273378], [0.1813838598387736, 0.6722185660414206], [0.21365686845063014, 0.1428737274580416], [0.6525962229220905, 0.5092314972536864], [0.14409194606082942, 0.36876195253012645], [0.3810072706070531, 0.2491073893585356], [0.4057345325726489, 0.13628212203334145], [0.6589654345726036, 0.11929113212325759], [0.5118226737134436, 0.05238812645692448], [0.4825851038502419, 0.4348993146930489], [0.5240217982839889, 0.7707053805867863], [0.8062858732427213, 0.8509141823068277], [0.8043910806692938, 0.6212826674295909], [0.14770043610250894, 0.37988768839810483], [0.9934535770806974, 0.6799110364172396], [0.067767735751191, 0.3137655042597186], [0.9958158069623947, 0.726637982999317], [0.12344969265330885, 0.9144831910873826], [0.06192919793340079, 0.094895480739556], [0.7040354417782194, 0.6649769518322519], [0.9609796529778833, 0.35687279405119077], [0.712150947902339, 0.7622909202623359], [0.6630813223207347, 0.9450056911510231], [0.13367496222456432, 0.22374220285139934], [0.1803451692283481, 0.05725321925421012], [0.15671586892228329, 0.6428018502331379], [0.0904734812788307, 0.0887771085528527], [0.9718661482450326, 0.6679384149986543], [0.5098611302849001, 0.6072213851311274], [0.4508774763010518, 0.01959981977284353], [0.3297009784972129, 0.3937933443577386], [0.49351204204947463, 0.4595073026861176], [0.14360098508058272, 0.021136011560755397], [0.1509202908404773, 0.37369090134501737], [0.8153385794598776, 0.5655671369760998], [0.2112818837963617, 0.00887517698156215], [0.08654232235729176, 0.16284534638833636], [0.38725741753121723, 0.8981317369729009], [0.8934034140221164, 0.35543331858117866], [0.4286432979428625, 0.3097535151674734], [0.7663040121802115, 0.5821566782631048], [0.9952654020174069, 0.5221646219283154], [0.020062850895111617, 0.8824557693517251], [0.10819822866909212, 0.2723444648400082], [0.69474267149362, 0.2998200567828857], [0.8906640504565513, 0.3083867067948075], [0.4924763237765829, 0.10100427170620596], [0.07026799039549492, 0.29502169857893545], [0.08843736434987892, 0.7289047920416258], [0.10620815853048937, 0.34187889271524396], [0.20125887824678435, 0.2860681555183966], [0.8773640053306407, 0.9563476061071962], [0.9432225022019286, 0.9994791511322937], [0.13563613798031937, 0.3373519213932864], [0.8587269726838475, 0.4751215567999363], [0.7571582824355558, 0.8296496599906129], [0.6861716144556532, 0.09940514628180974], [0.8563933901602275, 0.50811464169943], [0.23087775291356172, 0.8338365663554891], [0.5193379792114721, 0.7701229934134927], [0.3433334451764454, 0.8160003497549749], [0.6587729293586823, 0.051549976415450005], [0.28279025386662415, 0.6813237878724938], [0.502466433756727, 0.9632936328077967], [0.30327751955275506, 0.7009474565722479]], \"data03\": [[0.4098464718143954, 0.0886254141339946], [0.2070405888350909, 0.9832503769165538], [0.9560226669224692, 0.479242981871837], [0.40601117716635504, 0.4821670204872105], [0.716880130904611, 0.5265454160436102], [0.6723314084399745, 0.9430743268241158], [0.8421371025537246, 0.4907038517169977], [0.940740392297392, 0.030130396160569006], [0.4698011067009591, 0.9354703428207063], [0.10771652388871167, 0.7472800008826406], [0.5666853987413368, 0.7304114921128106], [0.9797770299024345, 0.10528115445790953], [0.4339147015301905, 0.7656025630259959], [0.8180344364829785, 0.7078790446085943], [0.43724959672412667, 0.9225381437161363], [0.8105342992752003, 0.5090713624505511], [0.22960846580858452, 0.7121099683829537], [0.4109781451687913, 0.8710483215307725], [0.7309511398181268, 0.43066181495719147], [0.6373144062380719, 0.48712869117962754], [0.7691426808213709, 0.12223180018508994], [0.9562240422458972, 0.1900160836371645], [0.3760066618461234, 0.5997405304143875], [0.8957014217970638, 0.2980776286541513], [0.20848049565757376, 0.18268336777640204], [0.06319643998308144, 0.5030276903035737], [0.2394216729185552, 0.9506696371583517], [0.7801992488254825, 0.2325800919586698], [0.3760754415175315, 0.7390820442705245], [0.5814837295524542, 0.7616713142711553], [0.2417021356737692, 0.7660564796818717], [0.4385545867531734, 0.9244958016032567], [0.18045227317063817, 0.3228087260890464], [0.37312046783579444, 0.6789428837728861], [0.8639333907383302, 0.1718199895762833], [0.8559936753056242, 0.7095739437934471], [0.940079549566491, 0.4893233847660068], [0.4057399896621089, 0.441921269249274], [0.9823102135057693, 0.6465757977985269], [0.4826039437830758, 0.4784335817739622], [0.8771207824694917, 0.7809835653732088], [0.4088792202469834, 0.5637844595472824], [0.31977322627438365, 0.8491603722968005], [0.6424685981654128, 0.3324874926307865], [0.7093654458159975, 0.6876383457298232], [0.7423468167300954, 0.31032585761982945], [0.604514627149687, 0.6607954615137971], [0.8584415473916255, 0.35447467775251196], [0.6499068382880037, 0.061312486142167555], [0.270485889197416, 0.44390848519873516], [0.8584748656310555, 0.7083258497660975], [0.1808249680067895, 0.2574186578134675], [0.5377051151480724, 0.6183630278806319], [0.38692991753348105, 0.12162527851495386], [0.6195852092738365, 0.6373243081047304], [0.5485863059731005, 0.05829174691838146], [0.46389401201881464, 0.04762410122741678], [0.8264448382313554, 0.511944559203932], [0.40099782742517387, 0.29931499088474944], [0.6195032797683993, 0.34643613534056983], [0.5007091183337946, 0.6492174346036962], [0.5008895041536758, 0.9488882701086157], [0.6089031038167406, 0.5162418791778752], [0.9953652409958986, 0.7135434407602232], [0.24794951921663877, 0.5861612487888144], [0.7384334058920138, 0.39493583813539335], [0.9300439181805716, 0.671816525290099], [0.5844120756954285, 0.23717057627672355], [0.8806471520789401, 0.8482091462350475], [0.6920591198056676, 0.2924731670105124], [0.35141827940417747, 0.12065632604964383], [0.8206994508517493, 0.4311841945956453], [0.2370849611913043, 0.2719515607303118], [0.9216936684824427, 0.2737262760819733], [0.9188489045540845, 0.6422025693611261], [0.6295307118357462, 0.44991232849801055], [0.5122231170341107, 0.9084847728691557], [0.29985152129987824, 0.7753971680607056], [0.4510620990884934, 0.33911251996550873], [0.7171435833472242, 0.7037406503612524], [0.2897107697174295, 0.23911862145194263], [0.20884415472966478, 0.20516107579979725], [0.31653691874943835, 0.6839686008379533], [0.5732346168518381, 0.41669528896656205], [0.46252622730189574, 0.19521144746509556], [0.5026185641627156, 0.3903295752782401], [0.4872415437421902, 0.09852342315710272], [0.779227269647643, 0.32254437988658846], [0.39013589036969454, 0.8894781356759724], [0.7685351778741765, 0.9422719149629099], [0.8614682627614487, 0.6574707574441057], [0.15345044177087064, 0.1956287488018773], [0.6153544991431779, 0.5256787607410369], [0.5132315524167129, 0.3108091040925598], [0.9892656389217689, 0.5553483943313786], [0.08282528798350319, 0.5355298073676616], [0.7114699262161587, 0.4651129288983915], [0.27315441706016785, 0.7678645943333149], [0.9949414263945612, 0.8869469716865482], [0.35472791394445913, 0.8298093684181447]], \"data01\": [[0.41709073558366083, 0.009933693670982957], [0.6955910282920739, 0.7897656793360066], [0.4248472379248316, 0.27531321879489834], [0.8581142260514297, 0.7177400045433364], [0.846932479609419, 0.4213559217565558], [0.07019911390868883, 0.14333587216899957], [0.3017524134841485, 0.19252168025197935], [0.9796236810301702, 0.3138152333176353], [0.035626996553034807, 0.8051701673672972], [0.4923926469985821, 0.012625830357479995], [0.9523768530135464, 0.0491059726975559], [0.8105737585294711, 0.5660003849850935], [0.2943304412963712, 0.686810696154396], [0.5962335185183412, 0.7268109050517068], [0.43117785229972994, 0.47969376130167696], [0.5923975029889863, 0.3676567217785285], [0.893752104720206, 0.8399700992017514], [0.5540211897717062, 0.45416355245100537], [0.4928665073452738, 0.3213658387821987], [0.3192704571895012, 0.09271986717104153], [0.263365783050724, 0.06043793213558557], [0.5422806135357958, 0.09095116720087482], [0.08226452393202399, 0.6827064564283071], [0.6356367098253985, 0.6807357672306377], [0.7964052251862078, 0.24317416588742535], [0.9547475054308089, 0.6404614421560298], [0.6846242716927129, 0.06913918311155143], [0.48829316680509927, 0.8729199617462652], [0.4854143101843673, 0.10960694983251273], [0.9666929205829677, 0.16905576511943454], [0.21134788749712163, 0.46737799144534753], [0.41164813817783297, 0.7759492194033726], [0.9896655767792834, 0.8544445157050565], [0.02841185671325175, 0.21038644476715873], [0.7013265140935161, 0.07664186926890304], [0.0251715638848119, 0.788914797103218], [0.3208817260865362, 0.5475000011493021], [0.07352706186557412, 0.7862548628154125], [0.06088456434663547, 0.9200470428587104], [0.11140631670405321, 0.4809727659278811], [0.16926890814543094, 0.459553670010184], [0.627686279501054, 0.5989791554809532], [0.43839309463984333, 0.5993187807242845], [0.8309037646039747, 0.5043734512337575], [0.23979218956447224, 0.30687852974345065], [0.19005270791973705, 0.5413529803491126], [0.7118996585829157, 0.9249269434027916], [0.8582949253267775, 0.9705508020302188], [0.5590558855960195, 0.39579460989699644], [0.7044204082888571, 0.7987452725553391], [0.605112035518179, 0.6350881477509265], [0.5592172832680401, 0.2299691652490331], [0.8603941909075867, 0.05120709286293723], [0.9197553591500698, 0.028463806171351802], [0.8496073257589813, 0.1228477519037694], [0.2544665354944545, 0.2202125178336386], [0.8775555422867709, 0.8290227537008228], [0.43513019009222575, 0.28549182770003945], [0.729494343964508, 0.7810640826310915], [0.4126407675387943, 0.5046658125966791], [0.1908360458112225, 0.1384489237765847], [0.7060195199561622, 0.778036552333978], [0.24063282092985294, 0.9213317935208427], [0.8513244268329954, 0.9430186320361914], [0.8241022892585868, 0.7044357972639433], [0.5252117866139705, 0.6939164454759088], [0.3863407943061684, 0.546551813367495], [0.5908807907349247, 0.36921722973788307], [0.13752361490782572, 0.982467574726993], [0.8082704078916083, 0.0656092254275048], [0.965825815244485, 0.8976783107422656], [0.7797958042329348, 0.26393098909487067], [0.23933508209581977, 0.5744758420233385], [0.8672604131084306, 0.5128662680937877], [0.8081150128937004, 0.554476808071934], [0.06368112422046845, 0.6471673318283991], [0.231228304048803, 0.1854741590544805], [0.5896854487035268, 0.27197820430902153], [0.13748694797777417, 0.14843865774278353], [0.6784407043714858, 0.030304170594405044], [0.9921906895152471, 0.9392555841521393], [0.28575198481557174, 0.34675413017620393], [0.7609127595588501, 0.10956460430560977], [0.046527167666138625, 0.3783269956614701], [0.33253590652220666, 0.38407945904141416], [0.9445527910270574, 0.6654236879194613], [0.6365170412547786, 0.24449092930615968], [0.6018486061318925, 0.661480973773685], [0.9281846814636464, 0.09849288379186216], [0.18167941079661343, 0.5808627476668515], [0.017823184026521055, 0.10686550466855071], [0.1900721761341725, 0.5482545074639875], [0.5218717978245897, 0.5197517077112073], [0.49582198590367044, 0.2962341178657576], [0.8004912055691525, 0.45572905099809846], [0.8594363114449111, 0.03866652012956684], [0.21295603224034498, 0.5990030248885009], [0.43726884144766365, 0.0004867594752598903], [0.42161750906258955, 0.5018135936855311], [0.0547173770819418, 0.5017261216916143]]}, \"id\": \"el96414536571856\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145365718566516616349\", {\"axes\": [{\"xlim\": [-0.20000000000000001, 1.2000000000000002], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [-0.20000000000000001, 1.2000000000000002], \"ylim\": [-0.20000000000000001, 1.2000000000000002], \"paths\": [], \"sharey\": [], \"sharex\": [], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"bottom\", \"nticks\": 9, \"tickvalues\": null}, {\"scale\": \"linear\", \"tickformat\": null, \"grid\": {\"gridOn\": false}, \"fontsize\": 10.0, \"position\": \"left\", \"nticks\": 9, \"tickvalues\": null}], \"lines\": [], \"markers\": [], \"id\": \"el96414536113616\", \"ydomain\": [-0.20000000000000001, 1.2000000000000002], \"collections\": [{\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#BFBF00\"], \"edgewidths\": [1.0], \"offsets\": \"data01\", \"yindex\": 1, \"id\": \"el96414543884048\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#BFBF00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#000000\"], \"edgewidths\": [1.0], \"offsets\": \"data02\", \"yindex\": 1, \"id\": \"el96414543955920\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#000000\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#0000FF\"], \"edgewidths\": [1.0], \"offsets\": \"data03\", \"yindex\": 1, \"id\": \"el96414543957584\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#0000FF\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#007F00\"], \"edgewidths\": [1.0], \"offsets\": \"data04\", \"yindex\": 1, \"id\": \"el96414560425296\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#007F00\"]}, {\"paths\": [[[[-0.5, 0.0], [0.5, 0.0], [0.0, -0.5], [0.0, 0.5]], [\"M\", \"L\", \"M\", \"L\"]]], \"edgecolors\": [\"#FF0000\"], \"edgewidths\": [1.0], \"offsets\": \"data05\", \"yindex\": 1, \"id\": \"el96414560426384\", \"pathtransforms\": [[4.969039949999533, 0.0, 0.0, 4.969039949999533, 0.0, 0.0]], \"pathcoordinates\": \"display\", \"offsetcoordinates\": \"data\", \"zorder\": 1, \"xindex\": 0, \"alphas\": [0.1], \"facecolors\": [\"#FF0000\"]}], \"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\"}, {\"element_ids\": [[\"el96414543884048\"], [\"el96414543955920\"], [\"el96414543957584\"], [\"el96414560425296\"], [\"el96414560426384\"]], \"type\": \"interactive_legend\", \"labels\": [\"0\", \"1\", \"2\", \"3\", \"4\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data04\": [[0.9588430789564042, 0.6524273028079878], [0.9110639960968554, 0.5732108771943734], [0.1196747838441613, 0.18508275660219697], [0.11446859495951, 0.6138808688662424], [0.9969650063282696, 0.07695021292315907], [0.04000832595810755, 0.6680945170106404], [0.8595637445186795, 0.23147976471742693], [0.46550503372369256, 0.2237384718444413], [0.2889983273891915, 0.07931564343308894], [0.7332639578005105, 0.5290531406613654], [0.47219244963377505, 0.292207224946918], [0.36603378202458836, 0.5347443302731564], [0.07374308587639289, 0.4966394675328142], [0.8212053023334988, 0.43871374689137466], [0.48801691478932074, 0.40966714178368036], [0.7570620648656129, 0.2606110148444858], [0.37107807260930714, 0.08937483777810629], [0.2695048247626399, 0.8066866320537381], [0.7345946354267014, 0.15657531573242267], [0.8465645262987437, 0.9139261452578302], [0.7731597126964512, 0.44666536992172634], [0.09726311997082848, 0.44940086096850873], [0.3128848054042207, 0.08179437299051329], [0.054297371248047455, 0.6964934161855384], [0.9964178644970716, 0.20657215375013938], [0.177698734352288, 0.09570310018074724], [0.37123100482185356, 0.7220107222790408], [0.3589325920964376, 0.3936551862994325], [0.23918094189867656, 0.5911130758518441], [0.19412444639857296, 0.5127646181849301], [0.7221568697894736, 0.024792440847191677], [0.9963498623999889, 0.7627946139093299], [0.6578810615587287, 0.26576180603378574], [0.18964066816521796, 0.9788268401766658], [0.7960500133787225, 0.9486860068478548], [0.6331488340440541, 0.7256699734894949], [0.05997465943644009, 0.7255050205514576], [0.45123696414113945, 0.050824790816173304], [0.3981555798526656, 0.5940661143252837], [0.4574877112189486, 0.7171266563833804], [0.17329540858703296, 0.04187295085349507], [0.5551602246692062, 0.4858483334364002], [0.675575702816968, 0.9868242589438908], [0.8264278406303862, 0.04782633490074317], [0.753975346409477, 0.5788519741372516], [0.03806626488278475, 0.07155939791943544], [0.795113651901603, 0.28014174429830796], [0.6539318070808459, 0.7018218260054466], [0.6049933023598654, 0.16232193959804986], [0.00079912648846725, 0.49228648720154566], [0.013114781463635872, 0.9545457112974848], [0.14710484933761359, 0.5893551623652425], [0.26562391867980684, 0.6066268202107414], [0.06049450827851821, 0.8679865440385066], [0.2578656308496723, 0.9365479368445849], [0.22906133301836384, 0.14416045993162074], [0.8240837710969812, 0.2770071902007831], [0.20185448655187266, 0.12532193725528784], [0.881092325628702, 0.884720788157515], [0.21436450568575982, 0.8267377704644704], [0.09124750057287223, 0.9953588810927804], [0.7458057935231055, 0.8138696157910104], [0.5043400350526346, 0.11914570059659024], [0.5862020432833676, 0.9315367835142864], [0.36415611319487795, 0.006986692731106969], [0.5532539595411161, 0.5383962494524664], [0.8128446991062696, 0.7825015421974374], [0.14007325741439247, 0.8888692517279119], [0.26762510211969903, 0.30537562757152403], [0.7395485502578282, 0.6446775039355818], [0.273796078111771, 0.12491934664885951], [0.5968614644069085, 0.608584300362758], [0.33862246805035456, 0.18949843940084687], [0.07160379461501021, 0.4390658193797916], [0.49859687569685474, 0.9704126030213763], [0.7144913096107074, 0.06809275523457425], [0.9906342627731619, 0.2051728622611535], [0.30616421419444173, 0.5075719409410157], [0.43181899369392907, 0.14050011761810988], [0.5481835598658806, 0.9337383557266488], [0.5922789121550232, 0.6065454317067481], [0.10793438223331675, 0.46153152916886886], [0.7218030237835277, 0.8015021709095485], [0.28781493382595613, 0.6987073120764528], [0.7101954909298428, 0.7445573429189948], [0.26491733998837474, 0.32516377858166023], [0.32929177720525493, 0.17845078715926477], [0.15393928318285965, 0.014351502625561174], [0.30573627751887034, 0.10704972728076023], [0.767593568436209, 0.2730517009310389], [0.5738480440000739, 0.6165217754396433], [0.9717102350944524, 0.9475792237640892], [0.6918493680668857, 0.9064723688429247], [0.49136225796249566, 0.965094028213592], [0.4189538130977012, 0.33762107364119875], [0.9528784220570516, 0.6564030876691848], [0.14422252170336136, 0.291455780992926], [0.5212103058543409, 0.15086922353097754], [0.8891494541942766, 0.036932063464012566], [0.7243161529127102, 0.5979637425112644]], \"data05\": [[0.027732277525769122, 0.7326035042447868], [0.38223726411047276, 0.3662981200304196], [0.953250912037412, 0.07446874484611776], [0.22219852722772315, 0.19520093883369538], [0.3051261201740513, 0.9749543589033207], [0.8193198019179616, 0.5042012781591255], [0.5784698159078305, 0.9856369123402908], [0.027617184503319403, 0.334422581623805], [0.9543877717509077, 0.86694362905042], [0.31213882462326004, 0.28202920165468537], [0.18407287867767852, 0.4885436412125148], [0.016469626666622994, 0.5561720792318058], [0.5240609701557668, 0.812180581360391], [0.1669567665617232, 0.8528719503750717], [0.8129420468290551, 0.4933303107049156], [0.002833802567491883, 0.9592919689890541], [0.09923761951162091, 0.15876446829484048], [0.4233708029190698, 0.03595437830372339], [0.005809099357757863, 0.4064802430234328], [0.6439284323771901, 0.34281852029003423], [0.5258895714533903, 0.2758183089465416], [0.2490888842079948, 0.5726782675403487], [0.2711950546864559, 0.6694290959505409], [0.058806340020986836, 0.9043172319742855], [0.9601897819139968, 0.8639552899987842], [0.16091193476589405, 0.746258835174717], [0.7945575900083599, 0.9492467284607887], [0.41541396961113675, 0.468747178954116], [0.1296549158742949, 0.5701748164979206], [0.05663718070504464, 0.14759840951683112], [0.19695621838288735, 0.09653126310157434], [0.04679972200788496, 0.9838887736072565], [0.902222208240269, 0.9458575454453456], [0.8373716439277921, 0.9288750130436264], [0.4782820685984708, 0.9869588615998884], [0.12772435899875278, 0.8094706569653018], [0.3407632394872363, 0.1140920029082878], [0.46090247442919585, 0.5407398333085283], [0.17987906200264803, 0.6819381025437358], [0.5210110938516268, 0.4830458673119201], [0.7694249110707195, 0.004595190708636343], [0.7472272782341517, 0.8572907370223923], [0.8646791692914033, 0.23395180665149862], [0.7641218393814242, 0.6112923842303966], [0.8525234424576078, 0.6823449232001844], [0.2678974353482877, 0.3019335919896844], [0.7291903264982751, 0.5972929760556739], [0.6876453619109382, 0.3909920066291014], [0.35088076292166537, 0.5554582470745515], [0.629399160560595, 0.1033241162198455], [0.39055618282314364, 0.029660839697256525], [0.5144285940785093, 0.33356079941615535], [0.30396353564287937, 0.5554181190642097], [0.796999760528667, 0.5118634831863179], [0.1078230751698096, 0.5902068697566979], [0.747514681460955, 0.645462711355599], [0.9669085740081871, 0.4984087925270697], [0.15715650744429033, 0.35312914266820894], [0.8728958517621116, 0.3880098002267456], [0.7144418335142413, 0.8037323056232524], [0.3493239230792018, 0.5179470332325185], [0.1880779700571047, 0.6583970857505594], [0.8916780035328351, 0.08820184374051021], [0.345322979056069, 0.4723690419759815], [0.20544091259836594, 0.9010194296302003], [0.10939673778824666, 0.4459973271210179], [0.6899335017791751, 0.14448085597899885], [0.03433567998445264, 0.06380619591282344], [0.4797710800309031, 0.19612708867628437], [0.518306674989326, 0.9185279393141138], [0.5591845358793935, 0.694884446482893], [0.956846570030116, 0.03056749698032979], [0.772936672798466, 0.06791435244989796], [0.7233024985247449, 0.43617104714271937], [0.8783149241161254, 0.6090955817303455], [0.9657986414149771, 0.676250271780259], [0.3397007022845787, 0.8371891425391603], [0.7268852163083745, 0.23862618241982758], [0.6262387503008751, 0.24913496546619573], [0.8093780377555375, 0.052347175321606154], [0.8314790236531127, 0.8472404043737314], [0.9229724002354529, 0.2415222455550552], [0.8141044732498339, 0.07540841951641519], [0.28506368515962255, 0.9165669493642231], [0.6058657432561324, 0.4733851293003041], [0.26099723471697966, 0.08418607219698104], [0.8146459943707198, 0.3636516664196304], [0.46446744385825733, 0.5805528232392523], [0.2732828358110101, 0.17429071474182234], [0.13449313291469356, 0.17666784836273353], [0.1447138451653326, 0.34412769179470815], [0.19670375571606524, 0.3213995357532248], [0.4978025146393892, 0.4309950595248051], [0.20619006742896495, 0.3124940335097408], [0.7673694729405008, 0.4727755088550235], [0.2566315513368608, 0.5423789698700843], [0.2626287020702287, 0.9645954235922461], [0.6426574367170579, 0.5054182909725616], [0.995231024299065, 0.0465058802370133], [0.5425098909424161, 0.34182506172610416]], \"data02\": [[0.06066969591495719, 0.5525294234343233], [0.9498369391498449, 0.16112709705428085], [0.6086590451398208, 0.568548964618283], [0.6720026837921436, 0.4857098681067773], [0.4627735236945656, 0.12751954351366868], [0.7042730952349673, 0.5436921692300374], [0.18106714116610723, 0.20049060873265778], [0.6475821773323257, 0.6701608599998026], [0.5681087348454958, 0.5581122170361856], [0.9541383145344952, 0.2323783174916082], [0.7966902388813616, 0.5155884856098234], [0.5853103927119501, 0.3149919734186799], [0.4553549670732038, 0.8465925489214037], [0.7384515305314945, 0.44737628027740306], [0.8122362779627881, 0.10008522439470402], [0.9272911735521501, 0.9015920853941103], [0.8263756067215121, 0.8560882485516653], [0.029956597665086293, 0.2863298739118133], [0.7728028218089087, 0.25901477045356636], [0.5217773936163203, 0.06637137355819867], [0.885387332241226, 0.3176316716278835], [0.45856166708365387, 0.05184299524331337], [0.5407225761596202, 0.9441883178319019], [0.9077649982654136, 0.7172173020432209], [0.5563100402768733, 0.553659200161456], [0.18711472229064618, 0.35974476987985604], [0.6811113675419537, 0.15918230108432907], [0.013846685418091642, 0.43295804116479997], [0.38009165785093446, 0.2793621769098912], [0.8086844901333918, 0.9610376321653145], [0.5761254124118753, 0.09813215580838908], [0.15178450453000336, 0.40699555242514285], [0.32985476037950434, 0.008376446001807092], [0.9517731461483258, 0.5680589295963213], [0.0303847229992098, 0.5766097683672401], [0.7781735271559485, 0.1371442613273378], [0.1813838598387736, 0.6722185660414206], [0.21365686845063014, 0.1428737274580416], [0.6525962229220905, 0.5092314972536864], [0.14409194606082942, 0.36876195253012645], [0.3810072706070531, 0.2491073893585356], [0.4057345325726489, 0.13628212203334145], [0.6589654345726036, 0.11929113212325759], [0.5118226737134436, 0.05238812645692448], [0.4825851038502419, 0.4348993146930489], [0.5240217982839889, 0.7707053805867863], [0.8062858732427213, 0.8509141823068277], [0.8043910806692938, 0.6212826674295909], [0.14770043610250894, 0.37988768839810483], [0.9934535770806974, 0.6799110364172396], [0.067767735751191, 0.3137655042597186], [0.9958158069623947, 0.726637982999317], [0.12344969265330885, 0.9144831910873826], [0.06192919793340079, 0.094895480739556], [0.7040354417782194, 0.6649769518322519], [0.9609796529778833, 0.35687279405119077], [0.712150947902339, 0.7622909202623359], [0.6630813223207347, 0.9450056911510231], [0.13367496222456432, 0.22374220285139934], [0.1803451692283481, 0.05725321925421012], [0.15671586892228329, 0.6428018502331379], [0.0904734812788307, 0.0887771085528527], [0.9718661482450326, 0.6679384149986543], [0.5098611302849001, 0.6072213851311274], [0.4508774763010518, 0.01959981977284353], [0.3297009784972129, 0.3937933443577386], [0.49351204204947463, 0.4595073026861176], [0.14360098508058272, 0.021136011560755397], [0.1509202908404773, 0.37369090134501737], [0.8153385794598776, 0.5655671369760998], [0.2112818837963617, 0.00887517698156215], [0.08654232235729176, 0.16284534638833636], [0.38725741753121723, 0.8981317369729009], [0.8934034140221164, 0.35543331858117866], [0.4286432979428625, 0.3097535151674734], [0.7663040121802115, 0.5821566782631048], [0.9952654020174069, 0.5221646219283154], [0.020062850895111617, 0.8824557693517251], [0.10819822866909212, 0.2723444648400082], [0.69474267149362, 0.2998200567828857], [0.8906640504565513, 0.3083867067948075], [0.4924763237765829, 0.10100427170620596], [0.07026799039549492, 0.29502169857893545], [0.08843736434987892, 0.7289047920416258], [0.10620815853048937, 0.34187889271524396], [0.20125887824678435, 0.2860681555183966], [0.8773640053306407, 0.9563476061071962], [0.9432225022019286, 0.9994791511322937], [0.13563613798031937, 0.3373519213932864], [0.8587269726838475, 0.4751215567999363], [0.7571582824355558, 0.8296496599906129], [0.6861716144556532, 0.09940514628180974], [0.8563933901602275, 0.50811464169943], [0.23087775291356172, 0.8338365663554891], [0.5193379792114721, 0.7701229934134927], [0.3433334451764454, 0.8160003497549749], [0.6587729293586823, 0.051549976415450005], [0.28279025386662415, 0.6813237878724938], [0.502466433756727, 0.9632936328077967], [0.30327751955275506, 0.7009474565722479]], \"data03\": [[0.4098464718143954, 0.0886254141339946], [0.2070405888350909, 0.9832503769165538], [0.9560226669224692, 0.479242981871837], [0.40601117716635504, 0.4821670204872105], [0.716880130904611, 0.5265454160436102], [0.6723314084399745, 0.9430743268241158], [0.8421371025537246, 0.4907038517169977], [0.940740392297392, 0.030130396160569006], [0.4698011067009591, 0.9354703428207063], [0.10771652388871167, 0.7472800008826406], [0.5666853987413368, 0.7304114921128106], [0.9797770299024345, 0.10528115445790953], [0.4339147015301905, 0.7656025630259959], [0.8180344364829785, 0.7078790446085943], [0.43724959672412667, 0.9225381437161363], [0.8105342992752003, 0.5090713624505511], [0.22960846580858452, 0.7121099683829537], [0.4109781451687913, 0.8710483215307725], [0.7309511398181268, 0.43066181495719147], [0.6373144062380719, 0.48712869117962754], [0.7691426808213709, 0.12223180018508994], [0.9562240422458972, 0.1900160836371645], [0.3760066618461234, 0.5997405304143875], [0.8957014217970638, 0.2980776286541513], [0.20848049565757376, 0.18268336777640204], [0.06319643998308144, 0.5030276903035737], [0.2394216729185552, 0.9506696371583517], [0.7801992488254825, 0.2325800919586698], [0.3760754415175315, 0.7390820442705245], [0.5814837295524542, 0.7616713142711553], [0.2417021356737692, 0.7660564796818717], [0.4385545867531734, 0.9244958016032567], [0.18045227317063817, 0.3228087260890464], [0.37312046783579444, 0.6789428837728861], [0.8639333907383302, 0.1718199895762833], [0.8559936753056242, 0.7095739437934471], [0.940079549566491, 0.4893233847660068], [0.4057399896621089, 0.441921269249274], [0.9823102135057693, 0.6465757977985269], [0.4826039437830758, 0.4784335817739622], [0.8771207824694917, 0.7809835653732088], [0.4088792202469834, 0.5637844595472824], [0.31977322627438365, 0.8491603722968005], [0.6424685981654128, 0.3324874926307865], [0.7093654458159975, 0.6876383457298232], [0.7423468167300954, 0.31032585761982945], [0.604514627149687, 0.6607954615137971], [0.8584415473916255, 0.35447467775251196], [0.6499068382880037, 0.061312486142167555], [0.270485889197416, 0.44390848519873516], [0.8584748656310555, 0.7083258497660975], [0.1808249680067895, 0.2574186578134675], [0.5377051151480724, 0.6183630278806319], [0.38692991753348105, 0.12162527851495386], [0.6195852092738365, 0.6373243081047304], [0.5485863059731005, 0.05829174691838146], [0.46389401201881464, 0.04762410122741678], [0.8264448382313554, 0.511944559203932], [0.40099782742517387, 0.29931499088474944], [0.6195032797683993, 0.34643613534056983], [0.5007091183337946, 0.6492174346036962], [0.5008895041536758, 0.9488882701086157], [0.6089031038167406, 0.5162418791778752], [0.9953652409958986, 0.7135434407602232], [0.24794951921663877, 0.5861612487888144], [0.7384334058920138, 0.39493583813539335], [0.9300439181805716, 0.671816525290099], [0.5844120756954285, 0.23717057627672355], [0.8806471520789401, 0.8482091462350475], [0.6920591198056676, 0.2924731670105124], [0.35141827940417747, 0.12065632604964383], [0.8206994508517493, 0.4311841945956453], [0.2370849611913043, 0.2719515607303118], [0.9216936684824427, 0.2737262760819733], [0.9188489045540845, 0.6422025693611261], [0.6295307118357462, 0.44991232849801055], [0.5122231170341107, 0.9084847728691557], [0.29985152129987824, 0.7753971680607056], [0.4510620990884934, 0.33911251996550873], [0.7171435833472242, 0.7037406503612524], [0.2897107697174295, 0.23911862145194263], [0.20884415472966478, 0.20516107579979725], [0.31653691874943835, 0.6839686008379533], [0.5732346168518381, 0.41669528896656205], [0.46252622730189574, 0.19521144746509556], [0.5026185641627156, 0.3903295752782401], [0.4872415437421902, 0.09852342315710272], [0.779227269647643, 0.32254437988658846], [0.39013589036969454, 0.8894781356759724], [0.7685351778741765, 0.9422719149629099], [0.8614682627614487, 0.6574707574441057], [0.15345044177087064, 0.1956287488018773], [0.6153544991431779, 0.5256787607410369], [0.5132315524167129, 0.3108091040925598], [0.9892656389217689, 0.5553483943313786], [0.08282528798350319, 0.5355298073676616], [0.7114699262161587, 0.4651129288983915], [0.27315441706016785, 0.7678645943333149], [0.9949414263945612, 0.8869469716865482], [0.35472791394445913, 0.8298093684181447]], \"data01\": [[0.41709073558366083, 0.009933693670982957], [0.6955910282920739, 0.7897656793360066], [0.4248472379248316, 0.27531321879489834], [0.8581142260514297, 0.7177400045433364], [0.846932479609419, 0.4213559217565558], [0.07019911390868883, 0.14333587216899957], [0.3017524134841485, 0.19252168025197935], [0.9796236810301702, 0.3138152333176353], [0.035626996553034807, 0.8051701673672972], [0.4923926469985821, 0.012625830357479995], [0.9523768530135464, 0.0491059726975559], [0.8105737585294711, 0.5660003849850935], [0.2943304412963712, 0.686810696154396], [0.5962335185183412, 0.7268109050517068], [0.43117785229972994, 0.47969376130167696], [0.5923975029889863, 0.3676567217785285], [0.893752104720206, 0.8399700992017514], [0.5540211897717062, 0.45416355245100537], [0.4928665073452738, 0.3213658387821987], [0.3192704571895012, 0.09271986717104153], [0.263365783050724, 0.06043793213558557], [0.5422806135357958, 0.09095116720087482], [0.08226452393202399, 0.6827064564283071], [0.6356367098253985, 0.6807357672306377], [0.7964052251862078, 0.24317416588742535], [0.9547475054308089, 0.6404614421560298], [0.6846242716927129, 0.06913918311155143], [0.48829316680509927, 0.8729199617462652], [0.4854143101843673, 0.10960694983251273], [0.9666929205829677, 0.16905576511943454], [0.21134788749712163, 0.46737799144534753], [0.41164813817783297, 0.7759492194033726], [0.9896655767792834, 0.8544445157050565], [0.02841185671325175, 0.21038644476715873], [0.7013265140935161, 0.07664186926890304], [0.0251715638848119, 0.788914797103218], [0.3208817260865362, 0.5475000011493021], [0.07352706186557412, 0.7862548628154125], [0.06088456434663547, 0.9200470428587104], [0.11140631670405321, 0.4809727659278811], [0.16926890814543094, 0.459553670010184], [0.627686279501054, 0.5989791554809532], [0.43839309463984333, 0.5993187807242845], [0.8309037646039747, 0.5043734512337575], [0.23979218956447224, 0.30687852974345065], [0.19005270791973705, 0.5413529803491126], [0.7118996585829157, 0.9249269434027916], [0.8582949253267775, 0.9705508020302188], [0.5590558855960195, 0.39579460989699644], [0.7044204082888571, 0.7987452725553391], [0.605112035518179, 0.6350881477509265], [0.5592172832680401, 0.2299691652490331], [0.8603941909075867, 0.05120709286293723], [0.9197553591500698, 0.028463806171351802], [0.8496073257589813, 0.1228477519037694], [0.2544665354944545, 0.2202125178336386], [0.8775555422867709, 0.8290227537008228], [0.43513019009222575, 0.28549182770003945], [0.729494343964508, 0.7810640826310915], [0.4126407675387943, 0.5046658125966791], [0.1908360458112225, 0.1384489237765847], [0.7060195199561622, 0.778036552333978], [0.24063282092985294, 0.9213317935208427], [0.8513244268329954, 0.9430186320361914], [0.8241022892585868, 0.7044357972639433], [0.5252117866139705, 0.6939164454759088], [0.3863407943061684, 0.546551813367495], [0.5908807907349247, 0.36921722973788307], [0.13752361490782572, 0.982467574726993], [0.8082704078916083, 0.0656092254275048], [0.965825815244485, 0.8976783107422656], [0.7797958042329348, 0.26393098909487067], [0.23933508209581977, 0.5744758420233385], [0.8672604131084306, 0.5128662680937877], [0.8081150128937004, 0.554476808071934], [0.06368112422046845, 0.6471673318283991], [0.231228304048803, 0.1854741590544805], [0.5896854487035268, 0.27197820430902153], [0.13748694797777417, 0.14843865774278353], [0.6784407043714858, 0.030304170594405044], [0.9921906895152471, 0.9392555841521393], [0.28575198481557174, 0.34675413017620393], [0.7609127595588501, 0.10956460430560977], [0.046527167666138625, 0.3783269956614701], [0.33253590652220666, 0.38407945904141416], [0.9445527910270574, 0.6654236879194613], [0.6365170412547786, 0.24449092930615968], [0.6018486061318925, 0.661480973773685], [0.9281846814636464, 0.09849288379186216], [0.18167941079661343, 0.5808627476668515], [0.017823184026521055, 0.10686550466855071], [0.1900721761341725, 0.5482545074639875], [0.5218717978245897, 0.5197517077112073], [0.49582198590367044, 0.2962341178657576], [0.8004912055691525, 0.45572905099809846], [0.8594363114449111, 0.03866652012956684], [0.21295603224034498, 0.5990030248885009], [0.43726884144766365, 0.0004867594752598903], [0.42161750906258955, 0.5018135936855311], [0.0547173770819418, 0.5017261216916143]]}, \"id\": \"el96414536571856\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 7, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10fd220d0>" | |
] | |
} | |
], | |
"prompt_number": 7 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## one legend affecting elements in two axes" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"N_paths = 1\n", | |
"N_steps = 100\n", | |
"\n", | |
"x1 = np.linspace(0, 10, 100)\n", | |
"dy1 = 0.1 * (np.random.random((N_paths, N_steps)) - 0.5)\n", | |
"y1 = dy1.cumsum(1)\n", | |
"\n", | |
"x2 = np.linspace(0, 10, 100)\n", | |
"dy2 = 0.1 * (np.random.random((N_paths, N_steps)) - 0.5)\n", | |
"y2 = dy2.cumsum(1)\n", | |
"\n", | |
"fig, ax = plt.subplots(2, 1, sharex=True, sharey=False)\n", | |
"\n", | |
"l1 = ax[0].plot(x1, dy1.T, lw=4, alpha=0.1, c='b', label='a')\n", | |
"l2 = ax[0].plot(x2, dy2.T, lw=4, alpha=0.2, c='r', label='b')\n", | |
"\n", | |
"l1 += ax[1].plot(x1, y1.T, lw=4, alpha=0.1, c='b', label='a')\n", | |
"l2 += ax[1].plot(x2, y2.T, lw=4, alpha=0.2, c='r', label='b')\n", | |
"\n", | |
"plugins.connect(fig, InteractiveLegendPlugin(plot_elements=[l1,l2], labels=[\"a\", \"b\"]))\n", | |
"mpld3.display() " | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"html": [ | |
"\n", | |
"\n", | |
"<style>\n", | |
"\n", | |
" .legend-box {\n", | |
" cursor: pointer; \n", | |
" }\n", | |
" \n", | |
"</style>\n", | |
"\n", | |
"<div id=\"fig_el964145439591208474220495\"></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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439591208474220495\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.059999999999999998, 0.059999999999999998], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414560449168\"], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": \"\", \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543960720\"}, {\"color\": \"#FF0000\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565017296\"}], \"markers\": [], \"id\": \"el96414536160400\", \"ydomain\": [-0.059999999999999998, 0.059999999999999998], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.20000000000000007], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414536160400\"], \"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\": 9, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565050384\"}, {\"color\": \"#FF0000\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565051536\"}], \"markers\": [], \"id\": \"el96414560449168\", \"ydomain\": [-0.5, 0.20000000000000007], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543960720\", \"el96414565050384\"], [\"el96414565017296\", \"el96414565051536\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.04568725387245053, -0.038179522814420046, -0.04568725387245053, -0.038179522814420046], [0.10101010101010101, 0.042684888736392895, 0.03140722634423122, -0.0030023651360576373, -0.0067722964701888225], [0.20202020202020202, -0.007032334122971651, -0.015944204187132573, -0.010034699259029289, -0.022716500657321396], [0.30303030303030304, 0.01309861183627159, 0.029935242196388247, 0.003063912577242301, 0.007218741539066851], [0.40404040404040403, -0.040427621844734134, 0.04487278229798502, -0.03736370926749183, 0.05209152383705187], [0.5050505050505051, -0.019277744427546796, 0.03943866639567004, -0.056641453695038625, 0.09153019023272191], [0.6060606060606061, -0.03524752370960093, -0.019883397890276645, -0.09188897740463955, 0.07164679234244527], [0.7070707070707071, -0.013668168165249062, 0.026095609511327125, -0.10555714556988861, 0.09774240185377239], [0.8080808080808081, -0.013691678049785383, 0.008783480296563118, -0.119248823619674, 0.10652588215033551], [0.9090909090909091, -0.0226851435363324, 0.008042171171361513, -0.1419339671560064, 0.11456805332169702], [1.0101010101010102, -0.009566548163283228, -0.044289087390566285, -0.15150051531928962, 0.07027896593113073], [1.1111111111111112, -0.017555902534309387, 0.0017051351317842413, -0.169056417853599, 0.07198410106291497], [1.2121212121212122, 0.024459413507499084, -0.028718142621272792, -0.14459700434609993, 0.04326595844164218], [1.3131313131313131, 0.008720012140656963, 0.04630421660494675, -0.13587699220544297, 0.08957017504658893], [1.4141414141414141, 0.04868090759112832, -0.006827676821999662, -0.08719608461431465, 0.08274249822458926], [1.5151515151515151, -0.031017743650840382, 0.011051332456708973, -0.11821382826515503, 0.09379383068129823], [1.6161616161616161, -0.01717796886131582, 0.006713147260363695, -0.13539179712647084, 0.10050697794166193], [1.7171717171717171, 0.016825446857564343, -0.0030058180084755804, -0.1185663502689065, 0.09750115993318635], [1.8181818181818181, 0.0004761428032478588, 0.013804806976781837, -0.11809020746565864, 0.11130596690996819], [1.9191919191919191, -0.01794021759048462, -0.04070039953010534, -0.13603042505614327, 0.07060556737986284], [2.0202020202020203, 0.009089925003298338, -0.03543341740923147, -0.12694050005284493, 0.035172149970631374], [2.121212121212121, -0.04549863564456455, -0.027309544672333198, -0.17243913569740948, 0.007862605298298176], [2.2222222222222223, 0.030653437086109625, -0.041570888271289824, -0.14178569861129986, -0.03370828297299165], [2.323232323232323, 0.02083443690542887, 0.033583572655635774, -0.12095126170587099, -0.0001247103173558778], [2.4242424242424243, -0.009609361505957238, 0.034482483615225726, -0.13056062321182824, 0.03435777329786985], [2.525252525252525, 0.01884186271559142, 0.048621130960803165, -0.11171876049623682, 0.08297890425867302], [2.6262626262626263, 0.04666012794681541, 0.004678296449652397, -0.0650586325494214, 0.08765720070832542], [2.727272727272727, -0.0060494399702841544, 0.043924726750988456, -0.07110807251970555, 0.13158192745931388], [2.8282828282828283, -0.027693264118391125, -0.04206812057692281, -0.09880133663809668, 0.08951380688239108], [2.929292929292929, 0.018204943712830025, -0.004764843596970614, -0.08059639292526666, 0.08474896328542046], [3.0303030303030303, -0.0297804339969601, -0.005784425579029917, -0.11037682692222675, 0.07896453770639054], [3.131313131313131, 0.0357130710326257, 0.014634317778972694, -0.07466375588960106, 0.09359885548536324], [3.2323232323232323, 0.04693214000612176, 0.0032095341450627205, -0.027731615883479298, 0.09680838963042597], [3.3333333333333335, -0.03875706018931018, 0.03308280039269477, -0.06648867607278948, 0.12989119002312075], [3.4343434343434343, -0.0423800307623117, -0.04002107772206172, -0.10886870683510118, 0.08987011230105903], [3.5353535353535355, -0.040193180235855844, -0.04076827227483483, -0.14906188707095702, 0.0491018400262242], [3.6363636363636362, 0.0028213943097940676, -0.048056185532197176, -0.14624049276116297, 0.0010456544940270207], [3.7373737373737375, 0.0338305880694594, 0.029447257541816575, -0.11240990469170356, 0.030492912035843596], [3.8383838383838382, 0.04426594823239391, -0.03488599488131427, -0.06814395645930965, -0.004393082845470672], [3.9393939393939394, -0.049716415319036034, -0.04194323067611662, -0.11786037177834569, -0.04633631352158729], [4.040404040404041, 0.046479293641455525, 0.019938701404156323, -0.07138107813689015, -0.02639761211743097], [4.141414141414141, -0.03351913327127477, -0.04551305216595373, -0.10490021140816493, -0.07191066428338469], [4.242424242424242, -0.00429653097387771, -0.023464909769053067, -0.10919674238204263, -0.09537557405243775], [4.343434343434343, -0.013460878952061994, 0.000418916507333833, -0.12265762133410463, -0.09495665754510392], [4.444444444444445, 0.01760659094155328, -0.046274630239352736, -0.10505103039255134, -0.14123128778445665], [4.545454545454545, -0.01760354767208071, 0.008150928295772287, -0.12265457806463205, -0.13308035948868435], [4.646464646464646, -0.01874506595142408, 0.0017660721451768892, -0.14139964401605612, -0.13131428734350747], [4.747474747474747, -0.0268937296094116, -0.007329921867069955, -0.16829337362546773, -0.13864420921057743], [4.848484848484849, -0.018872082213548236, 0.041526598212814604, -0.18716545583901598, -0.09711761099776284], [4.94949494949495, -0.033720524149328, -0.007421026672598464, -0.22088597998834397, -0.1045386376703613], [5.05050505050505, -0.037208223163732804, 0.030919074486841724, -0.25809420315207676, -0.07361956318351957], [5.151515151515151, -0.0343104701712633, -0.0440131985928528, -0.2924046733233401, -0.11763276177637237], [5.252525252525253, -0.022641691177215064, -0.04116324539366102, -0.3150463645005551, -0.1587960071700334], [5.353535353535354, 0.039572142353907463, -0.014471542809185957, -0.27547422214664763, -0.17326754997921934], [5.454545454545454, -0.041957310060989496, -0.03523120126234532, -0.31743153220763715, -0.20849875124156467], [5.555555555555555, 0.047400860854988375, 0.019223089254195126, -0.2700306713526488, -0.18927566198736953], [5.656565656565657, 0.030108066673072465, 0.02852921531926841, -0.23992260467957632, -0.16074644666810112], [5.757575757575758, 0.008062273976917046, -0.008286201519288383, -0.23186033070265927, -0.1690326481873895], [5.858585858585858, 0.0485655020684721, -0.017665222023177798, -0.18329482863418717, -0.1866978702105673], [5.959595959595959, -0.020117361950181503, 0.041610704712897455, -0.20341219058436866, -0.14508716549766984], [6.0606060606060606, 0.02864113718393063, 0.033741272570630323, -0.17477105340043803, -0.11134589292703952], [6.161616161616162, 0.039676271768755406, 0.009696017781903444, -0.13509478163168262, -0.10164987514513607], [6.262626262626262, -0.0004486536479686221, 0.024630769744877434, -0.13554343527965124, -0.07701910540025864], [6.363636363636363, 0.036602195015411544, 0.013052713864086518, -0.0989412402642397, -0.06396639153617212], [6.4646464646464645, -0.015915436011060182, -0.048543535131632544, -0.11485667627529988, -0.11250992666780466], [6.565656565656566, 0.018069549848153323, -0.033704102308741705, -0.09678712642714657, -0.14621402897654637], [6.666666666666667, -0.026347742260721965, 0.008980125706493048, -0.12313486868786853, -0.13723390327005333], [6.767676767676767, 0.01819635898833647, -0.04879319094007552, -0.10493850969953206, -0.18602709421012886], [6.8686868686868685, 0.027299894067889154, 0.02149064512408312, -0.0776386156316429, -0.16453644908604576], [6.96969696969697, -0.005514263932931263, -0.013040546735918625, -0.08315287956457416, -0.17757699582196437], [7.070707070707071, -0.03816544144616575, -0.03734943491250721, -0.12131832101073992, -0.2149264307344716], [7.171717171717171, -0.04292634986403248, -0.007957723163937036, -0.1642446708747724, -0.22288415389840863], [7.2727272727272725, 0.020045330271549856, 0.025881246370853407, -0.14419934060322254, -0.19700290752755523], [7.373737373737374, 0.0015390618147772652, -0.015304277795852328, -0.14266027878844528, -0.21230718532340756], [7.474747474747475, -0.03851241337266373, -0.046284837754572795, -0.181172692161109, -0.25859202307798035], [7.575757575757575, -0.02580100967945728, -0.025944921368302176, -0.2069737018405663, -0.2845369444462825], [7.6767676767676765, -0.0033849788937663884, -0.01566886512500254, -0.21035868073433267, -0.30020580957128506], [7.777777777777778, -0.009382009652942336, -0.02933467759910048, -0.219740690387275, -0.32954048717038553], [7.878787878787879, -0.028780396369985306, -0.036502564823828465, -0.2485210867572603, -0.366043051994214], [7.979797979797979, -0.012181224612189357, 0.009475273039741595, -0.26070231136944966, -0.3565677789544724], [8.080808080808081, 0.01666985316556433, -0.03789141370073173, -0.24403245820388533, -0.3944591926552041], [8.181818181818182, -0.03167623227132587, 0.03388159091661036, -0.2757086904752112, -0.36057760173859377], [8.282828282828282, 0.002464587170580535, 0.0012612425774723547, -0.27324410330463067, -0.3593163591611214], [8.383838383838384, 0.023617566414365257, 0.025862513705949088, -0.24962653689026543, -0.3334538454551723], [8.484848484848484, 0.026918065430378158, -0.011552821235502775, -0.22270847145988726, -0.3450066666906751], [8.585858585858587, -0.037569934940243334, -0.044372859250503965, -0.2602784064001306, -0.3893795259411791], [8.686868686868687, -0.04499655544267048, -0.040248950196136994, -0.3052749618428011, -0.4296284761373161], [8.787878787878787, 0.038827653961919374, -0.00682122923373395, -0.2664473078808817, -0.43644970537105005], [8.88888888888889, -0.02852959760227347, 0.029388526277811258, -0.2949769054831552, -0.4070611790932388], [8.98989898989899, 0.02636379599454243, -0.040586594237460895, -0.2686131094886128, -0.4476477733306997], [9.09090909090909, 0.014884013790054074, -0.033906991839118085, -0.2537290956985587, -0.4815547651698178], [9.191919191919192, 0.02129585744044429, 0.045719773259080124, -0.23243323825811443, -0.4358349919107377], [9.292929292929292, 0.03140129380314727, 0.03388889849042083, -0.20103194445496717, -0.4019460934203169], [9.393939393939394, 0.005037420458834774, 0.03398109505704496, -0.1959945239961324, -0.36796499836327196], [9.494949494949495, -0.04209990343262931, -0.039704123972772044, -0.23809442742876172, -0.407669122336044], [9.595959595959595, -0.013114634872268327, 0.018564096589862245, -0.25120906230103, -0.3891050257461818], [9.696969696969697, -0.04343026178443252, -0.04021469741957744, -0.29463932408546256, -0.4293197231657592], [9.797979797979798, -0.027640225406189448, -0.005567865577368137, -0.322279549491652, -0.4348875887431274], [9.8989898989899, -0.024898710862094244, 0.04640918840154706, -0.3471782603537462, -0.3884784003415803], [10.0, 0.04417483681506288, 0.007561368603671393, -0.3030034235386833, -0.3809170317379089]]}, \"id\": \"el96414543959120\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439591208474220495\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.059999999999999998, 0.059999999999999998], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414560449168\"], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": \"\", \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543960720\"}, {\"color\": \"#FF0000\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565017296\"}], \"markers\": [], \"id\": \"el96414536160400\", \"ydomain\": [-0.059999999999999998, 0.059999999999999998], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.20000000000000007], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414536160400\"], \"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\": 9, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565050384\"}, {\"color\": \"#FF0000\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565051536\"}], \"markers\": [], \"id\": \"el96414560449168\", \"ydomain\": [-0.5, 0.20000000000000007], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543960720\", \"el96414565050384\"], [\"el96414565017296\", \"el96414565051536\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.04568725387245053, -0.038179522814420046, -0.04568725387245053, -0.038179522814420046], [0.10101010101010101, 0.042684888736392895, 0.03140722634423122, -0.0030023651360576373, -0.0067722964701888225], [0.20202020202020202, -0.007032334122971651, -0.015944204187132573, -0.010034699259029289, -0.022716500657321396], [0.30303030303030304, 0.01309861183627159, 0.029935242196388247, 0.003063912577242301, 0.007218741539066851], [0.40404040404040403, -0.040427621844734134, 0.04487278229798502, -0.03736370926749183, 0.05209152383705187], [0.5050505050505051, -0.019277744427546796, 0.03943866639567004, -0.056641453695038625, 0.09153019023272191], [0.6060606060606061, -0.03524752370960093, -0.019883397890276645, -0.09188897740463955, 0.07164679234244527], [0.7070707070707071, -0.013668168165249062, 0.026095609511327125, -0.10555714556988861, 0.09774240185377239], [0.8080808080808081, -0.013691678049785383, 0.008783480296563118, -0.119248823619674, 0.10652588215033551], [0.9090909090909091, -0.0226851435363324, 0.008042171171361513, -0.1419339671560064, 0.11456805332169702], [1.0101010101010102, -0.009566548163283228, -0.044289087390566285, -0.15150051531928962, 0.07027896593113073], [1.1111111111111112, -0.017555902534309387, 0.0017051351317842413, -0.169056417853599, 0.07198410106291497], [1.2121212121212122, 0.024459413507499084, -0.028718142621272792, -0.14459700434609993, 0.04326595844164218], [1.3131313131313131, 0.008720012140656963, 0.04630421660494675, -0.13587699220544297, 0.08957017504658893], [1.4141414141414141, 0.04868090759112832, -0.006827676821999662, -0.08719608461431465, 0.08274249822458926], [1.5151515151515151, -0.031017743650840382, 0.011051332456708973, -0.11821382826515503, 0.09379383068129823], [1.6161616161616161, -0.01717796886131582, 0.006713147260363695, -0.13539179712647084, 0.10050697794166193], [1.7171717171717171, 0.016825446857564343, -0.0030058180084755804, -0.1185663502689065, 0.09750115993318635], [1.8181818181818181, 0.0004761428032478588, 0.013804806976781837, -0.11809020746565864, 0.11130596690996819], [1.9191919191919191, -0.01794021759048462, -0.04070039953010534, -0.13603042505614327, 0.07060556737986284], [2.0202020202020203, 0.009089925003298338, -0.03543341740923147, -0.12694050005284493, 0.035172149970631374], [2.121212121212121, -0.04549863564456455, -0.027309544672333198, -0.17243913569740948, 0.007862605298298176], [2.2222222222222223, 0.030653437086109625, -0.041570888271289824, -0.14178569861129986, -0.03370828297299165], [2.323232323232323, 0.02083443690542887, 0.033583572655635774, -0.12095126170587099, -0.0001247103173558778], [2.4242424242424243, -0.009609361505957238, 0.034482483615225726, -0.13056062321182824, 0.03435777329786985], [2.525252525252525, 0.01884186271559142, 0.048621130960803165, -0.11171876049623682, 0.08297890425867302], [2.6262626262626263, 0.04666012794681541, 0.004678296449652397, -0.0650586325494214, 0.08765720070832542], [2.727272727272727, -0.0060494399702841544, 0.043924726750988456, -0.07110807251970555, 0.13158192745931388], [2.8282828282828283, -0.027693264118391125, -0.04206812057692281, -0.09880133663809668, 0.08951380688239108], [2.929292929292929, 0.018204943712830025, -0.004764843596970614, -0.08059639292526666, 0.08474896328542046], [3.0303030303030303, -0.0297804339969601, -0.005784425579029917, -0.11037682692222675, 0.07896453770639054], [3.131313131313131, 0.0357130710326257, 0.014634317778972694, -0.07466375588960106, 0.09359885548536324], [3.2323232323232323, 0.04693214000612176, 0.0032095341450627205, -0.027731615883479298, 0.09680838963042597], [3.3333333333333335, -0.03875706018931018, 0.03308280039269477, -0.06648867607278948, 0.12989119002312075], [3.4343434343434343, -0.0423800307623117, -0.04002107772206172, -0.10886870683510118, 0.08987011230105903], [3.5353535353535355, -0.040193180235855844, -0.04076827227483483, -0.14906188707095702, 0.0491018400262242], [3.6363636363636362, 0.0028213943097940676, -0.048056185532197176, -0.14624049276116297, 0.0010456544940270207], [3.7373737373737375, 0.0338305880694594, 0.029447257541816575, -0.11240990469170356, 0.030492912035843596], [3.8383838383838382, 0.04426594823239391, -0.03488599488131427, -0.06814395645930965, -0.004393082845470672], [3.9393939393939394, -0.049716415319036034, -0.04194323067611662, -0.11786037177834569, -0.04633631352158729], [4.040404040404041, 0.046479293641455525, 0.019938701404156323, -0.07138107813689015, -0.02639761211743097], [4.141414141414141, -0.03351913327127477, -0.04551305216595373, -0.10490021140816493, -0.07191066428338469], [4.242424242424242, -0.00429653097387771, -0.023464909769053067, -0.10919674238204263, -0.09537557405243775], [4.343434343434343, -0.013460878952061994, 0.000418916507333833, -0.12265762133410463, -0.09495665754510392], [4.444444444444445, 0.01760659094155328, -0.046274630239352736, -0.10505103039255134, -0.14123128778445665], [4.545454545454545, -0.01760354767208071, 0.008150928295772287, -0.12265457806463205, -0.13308035948868435], [4.646464646464646, -0.01874506595142408, 0.0017660721451768892, -0.14139964401605612, -0.13131428734350747], [4.747474747474747, -0.0268937296094116, -0.007329921867069955, -0.16829337362546773, -0.13864420921057743], [4.848484848484849, -0.018872082213548236, 0.041526598212814604, -0.18716545583901598, -0.09711761099776284], [4.94949494949495, -0.033720524149328, -0.007421026672598464, -0.22088597998834397, -0.1045386376703613], [5.05050505050505, -0.037208223163732804, 0.030919074486841724, -0.25809420315207676, -0.07361956318351957], [5.151515151515151, -0.0343104701712633, -0.0440131985928528, -0.2924046733233401, -0.11763276177637237], [5.252525252525253, -0.022641691177215064, -0.04116324539366102, -0.3150463645005551, -0.1587960071700334], [5.353535353535354, 0.039572142353907463, -0.014471542809185957, -0.27547422214664763, -0.17326754997921934], [5.454545454545454, -0.041957310060989496, -0.03523120126234532, -0.31743153220763715, -0.20849875124156467], [5.555555555555555, 0.047400860854988375, 0.019223089254195126, -0.2700306713526488, -0.18927566198736953], [5.656565656565657, 0.030108066673072465, 0.02852921531926841, -0.23992260467957632, -0.16074644666810112], [5.757575757575758, 0.008062273976917046, -0.008286201519288383, -0.23186033070265927, -0.1690326481873895], [5.858585858585858, 0.0485655020684721, -0.017665222023177798, -0.18329482863418717, -0.1866978702105673], [5.959595959595959, -0.020117361950181503, 0.041610704712897455, -0.20341219058436866, -0.14508716549766984], [6.0606060606060606, 0.02864113718393063, 0.033741272570630323, -0.17477105340043803, -0.11134589292703952], [6.161616161616162, 0.039676271768755406, 0.009696017781903444, -0.13509478163168262, -0.10164987514513607], [6.262626262626262, -0.0004486536479686221, 0.024630769744877434, -0.13554343527965124, -0.07701910540025864], [6.363636363636363, 0.036602195015411544, 0.013052713864086518, -0.0989412402642397, -0.06396639153617212], [6.4646464646464645, -0.015915436011060182, -0.048543535131632544, -0.11485667627529988, -0.11250992666780466], [6.565656565656566, 0.018069549848153323, -0.033704102308741705, -0.09678712642714657, -0.14621402897654637], [6.666666666666667, -0.026347742260721965, 0.008980125706493048, -0.12313486868786853, -0.13723390327005333], [6.767676767676767, 0.01819635898833647, -0.04879319094007552, -0.10493850969953206, -0.18602709421012886], [6.8686868686868685, 0.027299894067889154, 0.02149064512408312, -0.0776386156316429, -0.16453644908604576], [6.96969696969697, -0.005514263932931263, -0.013040546735918625, -0.08315287956457416, -0.17757699582196437], [7.070707070707071, -0.03816544144616575, -0.03734943491250721, -0.12131832101073992, -0.2149264307344716], [7.171717171717171, -0.04292634986403248, -0.007957723163937036, -0.1642446708747724, -0.22288415389840863], [7.2727272727272725, 0.020045330271549856, 0.025881246370853407, -0.14419934060322254, -0.19700290752755523], [7.373737373737374, 0.0015390618147772652, -0.015304277795852328, -0.14266027878844528, -0.21230718532340756], [7.474747474747475, -0.03851241337266373, -0.046284837754572795, -0.181172692161109, -0.25859202307798035], [7.575757575757575, -0.02580100967945728, -0.025944921368302176, -0.2069737018405663, -0.2845369444462825], [7.6767676767676765, -0.0033849788937663884, -0.01566886512500254, -0.21035868073433267, -0.30020580957128506], [7.777777777777778, -0.009382009652942336, -0.02933467759910048, -0.219740690387275, -0.32954048717038553], [7.878787878787879, -0.028780396369985306, -0.036502564823828465, -0.2485210867572603, -0.366043051994214], [7.979797979797979, -0.012181224612189357, 0.009475273039741595, -0.26070231136944966, -0.3565677789544724], [8.080808080808081, 0.01666985316556433, -0.03789141370073173, -0.24403245820388533, -0.3944591926552041], [8.181818181818182, -0.03167623227132587, 0.03388159091661036, -0.2757086904752112, -0.36057760173859377], [8.282828282828282, 0.002464587170580535, 0.0012612425774723547, -0.27324410330463067, -0.3593163591611214], [8.383838383838384, 0.023617566414365257, 0.025862513705949088, -0.24962653689026543, -0.3334538454551723], [8.484848484848484, 0.026918065430378158, -0.011552821235502775, -0.22270847145988726, -0.3450066666906751], [8.585858585858587, -0.037569934940243334, -0.044372859250503965, -0.2602784064001306, -0.3893795259411791], [8.686868686868687, -0.04499655544267048, -0.040248950196136994, -0.3052749618428011, -0.4296284761373161], [8.787878787878787, 0.038827653961919374, -0.00682122923373395, -0.2664473078808817, -0.43644970537105005], [8.88888888888889, -0.02852959760227347, 0.029388526277811258, -0.2949769054831552, -0.4070611790932388], [8.98989898989899, 0.02636379599454243, -0.040586594237460895, -0.2686131094886128, -0.4476477733306997], [9.09090909090909, 0.014884013790054074, -0.033906991839118085, -0.2537290956985587, -0.4815547651698178], [9.191919191919192, 0.02129585744044429, 0.045719773259080124, -0.23243323825811443, -0.4358349919107377], [9.292929292929292, 0.03140129380314727, 0.03388889849042083, -0.20103194445496717, -0.4019460934203169], [9.393939393939394, 0.005037420458834774, 0.03398109505704496, -0.1959945239961324, -0.36796499836327196], [9.494949494949495, -0.04209990343262931, -0.039704123972772044, -0.23809442742876172, -0.407669122336044], [9.595959595959595, -0.013114634872268327, 0.018564096589862245, -0.25120906230103, -0.3891050257461818], [9.696969696969697, -0.04343026178443252, -0.04021469741957744, -0.29463932408546256, -0.4293197231657592], [9.797979797979798, -0.027640225406189448, -0.005567865577368137, -0.322279549491652, -0.4348875887431274], [9.8989898989899, -0.024898710862094244, 0.04640918840154706, -0.3471782603537462, -0.3884784003415803], [10.0, 0.04417483681506288, 0.007561368603671393, -0.3030034235386833, -0.3809170317379089]]}, \"id\": \"el96414543959120\"});\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 = [\"element_ids\", \"labels\"];\n", | |
" InteractiveLegend.prototype.defaultProps = {\"ax\":null, \n", | |
" \"alpha_sel\":1.0,\n", | |
" \"alpha_unsel\":0}\n", | |
" function InteractiveLegend(fig, props){\n", | |
" mpld3.Plugin.call(this, fig, props);\n", | |
" };\n", | |
"\n", | |
" InteractiveLegend.prototype.draw = function(){\n", | |
" console.log(this)\n", | |
" var alpha_sel = this.props.alpha_sel\n", | |
" var alpha_unsel = this.props.alpha_unsel\n", | |
" \n", | |
" var legendItems = new Array();\n", | |
" for(var i=0; i<this.props.labels.length; i++){\n", | |
" var obj = {}\n", | |
" obj.label = this.props.labels[i]\n", | |
" \n", | |
" var element_id = this.props.element_ids[i]\n", | |
" mpld3_elements = []\n", | |
" for(var j=0; j<element_id.length; j++){\n", | |
" var mpld3_element = mpld3.get_element(element_id[j], this.fig)\n", | |
" mpld3_elements.push(mpld3_element)\n", | |
" }\n", | |
" \n", | |
" obj.mpld3_elements = mpld3_elements\n", | |
" obj.visible = false; // must be setable from python side\n", | |
" legendItems.push(obj);\n", | |
" }\n", | |
" console.log(legendItems)\n", | |
" \n", | |
" // determine the axes with which this legend is associated\n", | |
" var ax = this.props.ax\n", | |
" if(!ax){\n", | |
" ax = this.fig.axes[0]\n", | |
" } else{\n", | |
" ax = mpld3.get_element(ax, this.fig);\n", | |
" }\n", | |
" \n", | |
" // add a legend group to the canvas of the figure\n", | |
" var legend = this.fig.canvas.append(\"svg:g\")\n", | |
" .attr(\"class\", \"legend\");\n", | |
" \n", | |
" // add the rectangles\n", | |
" legend.selectAll(\"rect\")\n", | |
" .data(legendItems)\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\", get_color)\n", | |
" .attr(\"class\", \"legend-box\")\n", | |
" .style(\"fill\", function(d, i) {\n", | |
" return d.visible ? get_color(d) : \"white\";}) \n", | |
" .on(\"click\", click)\n", | |
" \n", | |
" // add the labels\n", | |
" legend.selectAll(\"text\")\n", | |
" .data(legendItems)\n", | |
" .enter().append(\"text\")\n", | |
" .attr(\"x\", function (d) {\n", | |
" return ax.width+10+ax.position[0] + 40})\n", | |
" .attr(\"y\", function(d,i) { \n", | |
" return ax.position[1]+ i * 25})\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", | |
" return d.visible ? get_color(d) : \"white\";\n", | |
" })\n", | |
" \n", | |
" for(var i=0; i<d.mpld3_elements.length; i++){\n", | |
" \n", | |
" var type = d.mpld3_elements[i].constructor.name\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" d3.select(d.mpld3_elements[i].path[0][0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" d3.selectAll(d.mpld3_elements[i].pathsobj[0])\n", | |
" .style(\"stroke-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel)\n", | |
" .style(\"fill-opacity\", \n", | |
" d.visible ? alpha_sel : alpha_unsel);\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" }\n", | |
" };\n", | |
" \n", | |
" // helper function for determining the color of the rectangles\n", | |
" function get_color(d){\n", | |
" var type = d.mpld3_elements[0].constructor.name\n", | |
" var color = \"black\";\n", | |
" if(type ==\"mpld3_Line\"){\n", | |
" color = d.mpld3_elements[0].props.edgecolor;\n", | |
" } else if(type==\"mpld3_PathCollection\"){\n", | |
" color = d.mpld3_elements[0].props.facecolors[0];\n", | |
" } else{\n", | |
" console.log(type + \" not yet supported\")\n", | |
" }\n", | |
" return color\n", | |
" };\n", | |
" };\n", | |
" \n", | |
" mpld3.draw_figure(\"fig_el964145439591208474220495\", {\"axes\": [{\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.059999999999999998, 0.059999999999999998], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414560449168\"], \"axesbgalpha\": null, \"axes\": [{\"scale\": \"linear\", \"tickformat\": \"\", \"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\": 7, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 1, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414543960720\"}, {\"color\": \"#FF0000\", \"yindex\": 2, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565017296\"}], \"markers\": [], \"id\": \"el96414536160400\", \"ydomain\": [-0.059999999999999998, 0.059999999999999998], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.54772727272727284, 0.77500000000000002, 0.35227272727272718]}, {\"xlim\": [0.0, 10.0], \"yscale\": \"linear\", \"axesbg\": \"#FFFFFF\", \"texts\": [], \"zoomable\": true, \"images\": [], \"xdomain\": [0.0, 10.0], \"ylim\": [-0.5, 0.20000000000000007], \"paths\": [], \"sharey\": [], \"sharex\": [\"el96414536160400\"], \"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\": 9, \"tickvalues\": null}], \"lines\": [{\"color\": \"#0000FF\", \"yindex\": 3, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.1, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565050384\"}, {\"color\": \"#FF0000\", \"yindex\": 4, \"coordinates\": \"data\", \"dasharray\": \"10,0\", \"zorder\": 2, \"alpha\": 0.2, \"xindex\": 0, \"linewidth\": 4, \"data\": \"data01\", \"id\": \"el96414565051536\"}], \"markers\": [], \"id\": \"el96414560449168\", \"ydomain\": [-0.5, 0.20000000000000007], \"collections\": [], \"xscale\": \"linear\", \"bbox\": [0.125, 0.12500000000000011, 0.77500000000000002, 0.35227272727272724]}], \"height\": 640.0, \"width\": 960.0, \"plugins\": [{\"type\": \"reset\"}, {\"enabled\": false, \"button\": true, \"type\": \"zoom\"}, {\"enabled\": false, \"button\": true, \"type\": \"boxzoom\"}, {\"element_ids\": [[\"el96414543960720\", \"el96414565050384\"], [\"el96414565017296\", \"el96414565051536\"]], \"type\": \"interactive_legend\", \"labels\": [\"a\", \"b\"], \"alpha_unsel\": 0.2, \"ax\": null, \"alpha_sel\": 1}], \"data\": {\"data01\": [[0.0, -0.04568725387245053, -0.038179522814420046, -0.04568725387245053, -0.038179522814420046], [0.10101010101010101, 0.042684888736392895, 0.03140722634423122, -0.0030023651360576373, -0.0067722964701888225], [0.20202020202020202, -0.007032334122971651, -0.015944204187132573, -0.010034699259029289, -0.022716500657321396], [0.30303030303030304, 0.01309861183627159, 0.029935242196388247, 0.003063912577242301, 0.007218741539066851], [0.40404040404040403, -0.040427621844734134, 0.04487278229798502, -0.03736370926749183, 0.05209152383705187], [0.5050505050505051, -0.019277744427546796, 0.03943866639567004, -0.056641453695038625, 0.09153019023272191], [0.6060606060606061, -0.03524752370960093, -0.019883397890276645, -0.09188897740463955, 0.07164679234244527], [0.7070707070707071, -0.013668168165249062, 0.026095609511327125, -0.10555714556988861, 0.09774240185377239], [0.8080808080808081, -0.013691678049785383, 0.008783480296563118, -0.119248823619674, 0.10652588215033551], [0.9090909090909091, -0.0226851435363324, 0.008042171171361513, -0.1419339671560064, 0.11456805332169702], [1.0101010101010102, -0.009566548163283228, -0.044289087390566285, -0.15150051531928962, 0.07027896593113073], [1.1111111111111112, -0.017555902534309387, 0.0017051351317842413, -0.169056417853599, 0.07198410106291497], [1.2121212121212122, 0.024459413507499084, -0.028718142621272792, -0.14459700434609993, 0.04326595844164218], [1.3131313131313131, 0.008720012140656963, 0.04630421660494675, -0.13587699220544297, 0.08957017504658893], [1.4141414141414141, 0.04868090759112832, -0.006827676821999662, -0.08719608461431465, 0.08274249822458926], [1.5151515151515151, -0.031017743650840382, 0.011051332456708973, -0.11821382826515503, 0.09379383068129823], [1.6161616161616161, -0.01717796886131582, 0.006713147260363695, -0.13539179712647084, 0.10050697794166193], [1.7171717171717171, 0.016825446857564343, -0.0030058180084755804, -0.1185663502689065, 0.09750115993318635], [1.8181818181818181, 0.0004761428032478588, 0.013804806976781837, -0.11809020746565864, 0.11130596690996819], [1.9191919191919191, -0.01794021759048462, -0.04070039953010534, -0.13603042505614327, 0.07060556737986284], [2.0202020202020203, 0.009089925003298338, -0.03543341740923147, -0.12694050005284493, 0.035172149970631374], [2.121212121212121, -0.04549863564456455, -0.027309544672333198, -0.17243913569740948, 0.007862605298298176], [2.2222222222222223, 0.030653437086109625, -0.041570888271289824, -0.14178569861129986, -0.03370828297299165], [2.323232323232323, 0.02083443690542887, 0.033583572655635774, -0.12095126170587099, -0.0001247103173558778], [2.4242424242424243, -0.009609361505957238, 0.034482483615225726, -0.13056062321182824, 0.03435777329786985], [2.525252525252525, 0.01884186271559142, 0.048621130960803165, -0.11171876049623682, 0.08297890425867302], [2.6262626262626263, 0.04666012794681541, 0.004678296449652397, -0.0650586325494214, 0.08765720070832542], [2.727272727272727, -0.0060494399702841544, 0.043924726750988456, -0.07110807251970555, 0.13158192745931388], [2.8282828282828283, -0.027693264118391125, -0.04206812057692281, -0.09880133663809668, 0.08951380688239108], [2.929292929292929, 0.018204943712830025, -0.004764843596970614, -0.08059639292526666, 0.08474896328542046], [3.0303030303030303, -0.0297804339969601, -0.005784425579029917, -0.11037682692222675, 0.07896453770639054], [3.131313131313131, 0.0357130710326257, 0.014634317778972694, -0.07466375588960106, 0.09359885548536324], [3.2323232323232323, 0.04693214000612176, 0.0032095341450627205, -0.027731615883479298, 0.09680838963042597], [3.3333333333333335, -0.03875706018931018, 0.03308280039269477, -0.06648867607278948, 0.12989119002312075], [3.4343434343434343, -0.0423800307623117, -0.04002107772206172, -0.10886870683510118, 0.08987011230105903], [3.5353535353535355, -0.040193180235855844, -0.04076827227483483, -0.14906188707095702, 0.0491018400262242], [3.6363636363636362, 0.0028213943097940676, -0.048056185532197176, -0.14624049276116297, 0.0010456544940270207], [3.7373737373737375, 0.0338305880694594, 0.029447257541816575, -0.11240990469170356, 0.030492912035843596], [3.8383838383838382, 0.04426594823239391, -0.03488599488131427, -0.06814395645930965, -0.004393082845470672], [3.9393939393939394, -0.049716415319036034, -0.04194323067611662, -0.11786037177834569, -0.04633631352158729], [4.040404040404041, 0.046479293641455525, 0.019938701404156323, -0.07138107813689015, -0.02639761211743097], [4.141414141414141, -0.03351913327127477, -0.04551305216595373, -0.10490021140816493, -0.07191066428338469], [4.242424242424242, -0.00429653097387771, -0.023464909769053067, -0.10919674238204263, -0.09537557405243775], [4.343434343434343, -0.013460878952061994, 0.000418916507333833, -0.12265762133410463, -0.09495665754510392], [4.444444444444445, 0.01760659094155328, -0.046274630239352736, -0.10505103039255134, -0.14123128778445665], [4.545454545454545, -0.01760354767208071, 0.008150928295772287, -0.12265457806463205, -0.13308035948868435], [4.646464646464646, -0.01874506595142408, 0.0017660721451768892, -0.14139964401605612, -0.13131428734350747], [4.747474747474747, -0.0268937296094116, -0.007329921867069955, -0.16829337362546773, -0.13864420921057743], [4.848484848484849, -0.018872082213548236, 0.041526598212814604, -0.18716545583901598, -0.09711761099776284], [4.94949494949495, -0.033720524149328, -0.007421026672598464, -0.22088597998834397, -0.1045386376703613], [5.05050505050505, -0.037208223163732804, 0.030919074486841724, -0.25809420315207676, -0.07361956318351957], [5.151515151515151, -0.0343104701712633, -0.0440131985928528, -0.2924046733233401, -0.11763276177637237], [5.252525252525253, -0.022641691177215064, -0.04116324539366102, -0.3150463645005551, -0.1587960071700334], [5.353535353535354, 0.039572142353907463, -0.014471542809185957, -0.27547422214664763, -0.17326754997921934], [5.454545454545454, -0.041957310060989496, -0.03523120126234532, -0.31743153220763715, -0.20849875124156467], [5.555555555555555, 0.047400860854988375, 0.019223089254195126, -0.2700306713526488, -0.18927566198736953], [5.656565656565657, 0.030108066673072465, 0.02852921531926841, -0.23992260467957632, -0.16074644666810112], [5.757575757575758, 0.008062273976917046, -0.008286201519288383, -0.23186033070265927, -0.1690326481873895], [5.858585858585858, 0.0485655020684721, -0.017665222023177798, -0.18329482863418717, -0.1866978702105673], [5.959595959595959, -0.020117361950181503, 0.041610704712897455, -0.20341219058436866, -0.14508716549766984], [6.0606060606060606, 0.02864113718393063, 0.033741272570630323, -0.17477105340043803, -0.11134589292703952], [6.161616161616162, 0.039676271768755406, 0.009696017781903444, -0.13509478163168262, -0.10164987514513607], [6.262626262626262, -0.0004486536479686221, 0.024630769744877434, -0.13554343527965124, -0.07701910540025864], [6.363636363636363, 0.036602195015411544, 0.013052713864086518, -0.0989412402642397, -0.06396639153617212], [6.4646464646464645, -0.015915436011060182, -0.048543535131632544, -0.11485667627529988, -0.11250992666780466], [6.565656565656566, 0.018069549848153323, -0.033704102308741705, -0.09678712642714657, -0.14621402897654637], [6.666666666666667, -0.026347742260721965, 0.008980125706493048, -0.12313486868786853, -0.13723390327005333], [6.767676767676767, 0.01819635898833647, -0.04879319094007552, -0.10493850969953206, -0.18602709421012886], [6.8686868686868685, 0.027299894067889154, 0.02149064512408312, -0.0776386156316429, -0.16453644908604576], [6.96969696969697, -0.005514263932931263, -0.013040546735918625, -0.08315287956457416, -0.17757699582196437], [7.070707070707071, -0.03816544144616575, -0.03734943491250721, -0.12131832101073992, -0.2149264307344716], [7.171717171717171, -0.04292634986403248, -0.007957723163937036, -0.1642446708747724, -0.22288415389840863], [7.2727272727272725, 0.020045330271549856, 0.025881246370853407, -0.14419934060322254, -0.19700290752755523], [7.373737373737374, 0.0015390618147772652, -0.015304277795852328, -0.14266027878844528, -0.21230718532340756], [7.474747474747475, -0.03851241337266373, -0.046284837754572795, -0.181172692161109, -0.25859202307798035], [7.575757575757575, -0.02580100967945728, -0.025944921368302176, -0.2069737018405663, -0.2845369444462825], [7.6767676767676765, -0.0033849788937663884, -0.01566886512500254, -0.21035868073433267, -0.30020580957128506], [7.777777777777778, -0.009382009652942336, -0.02933467759910048, -0.219740690387275, -0.32954048717038553], [7.878787878787879, -0.028780396369985306, -0.036502564823828465, -0.2485210867572603, -0.366043051994214], [7.979797979797979, -0.012181224612189357, 0.009475273039741595, -0.26070231136944966, -0.3565677789544724], [8.080808080808081, 0.01666985316556433, -0.03789141370073173, -0.24403245820388533, -0.3944591926552041], [8.181818181818182, -0.03167623227132587, 0.03388159091661036, -0.2757086904752112, -0.36057760173859377], [8.282828282828282, 0.002464587170580535, 0.0012612425774723547, -0.27324410330463067, -0.3593163591611214], [8.383838383838384, 0.023617566414365257, 0.025862513705949088, -0.24962653689026543, -0.3334538454551723], [8.484848484848484, 0.026918065430378158, -0.011552821235502775, -0.22270847145988726, -0.3450066666906751], [8.585858585858587, -0.037569934940243334, -0.044372859250503965, -0.2602784064001306, -0.3893795259411791], [8.686868686868687, -0.04499655544267048, -0.040248950196136994, -0.3052749618428011, -0.4296284761373161], [8.787878787878787, 0.038827653961919374, -0.00682122923373395, -0.2664473078808817, -0.43644970537105005], [8.88888888888889, -0.02852959760227347, 0.029388526277811258, -0.2949769054831552, -0.4070611790932388], [8.98989898989899, 0.02636379599454243, -0.040586594237460895, -0.2686131094886128, -0.4476477733306997], [9.09090909090909, 0.014884013790054074, -0.033906991839118085, -0.2537290956985587, -0.4815547651698178], [9.191919191919192, 0.02129585744044429, 0.045719773259080124, -0.23243323825811443, -0.4358349919107377], [9.292929292929292, 0.03140129380314727, 0.03388889849042083, -0.20103194445496717, -0.4019460934203169], [9.393939393939394, 0.005037420458834774, 0.03398109505704496, -0.1959945239961324, -0.36796499836327196], [9.494949494949495, -0.04209990343262931, -0.039704123972772044, -0.23809442742876172, -0.407669122336044], [9.595959595959595, -0.013114634872268327, 0.018564096589862245, -0.25120906230103, -0.3891050257461818], [9.696969696969697, -0.04343026178443252, -0.04021469741957744, -0.29463932408546256, -0.4293197231657592], [9.797979797979798, -0.027640225406189448, -0.005567865577368137, -0.322279549491652, -0.4348875887431274], [9.8989898989899, -0.024898710862094244, 0.04640918840154706, -0.3471782603537462, -0.3884784003415803], [10.0, 0.04417483681506288, 0.007561368603671393, -0.3030034235386833, -0.3809170317379089]]}, \"id\": \"el96414543959120\"});\n", | |
" })\n", | |
" });\n", | |
"}\n", | |
"</script>" | |
], | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 8, | |
"text": [ | |
"<IPython.core.display.HTML at 0x10e60d690>" | |
] | |
} | |
], | |
"prompt_number": 8 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment