cript = d3.select("head")
	    .append("script")
	    .attr("src", "http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js")
	    .attr("async", true);

	script[0][0].onload = script[0][0].onreadystatechange = function(){


	    var event = document.createEvent("HTMLEvents");
	    event.initEvent("load_nyaplot",false,false);
	    window.dispatchEvent(event);
	    console.log('Finished loading Nyaplotjs');

	};


});});
}
</script>

  </head>
  <body>
    <div id="main">
      
<h1>Nayplot example