{ "metadata": { "language": "ruby", "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "require 'nyaplot'" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "" ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"http://d3js.org/d3.v3.min\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});\\n}\\n\"" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "true" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "path = File.expand_path(\"../data/11-1-result0.3.csv\", __FILE__)\n", "df = Nyaplot::DataFrame.from_csv(path)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
t | v | w |
---|---|---|
0.0 | 2.286944 | 4.001058 |
0.01 | 1.832105 | 3.996535 |
0.02 | 1.476517 | 3.988085 |
0.03 | 1.162703 | 3.976401 |
0.04 | 0.861662 | 3.961766 |
0.05 | 0.554821 | 3.944233 |
0.06 | 0.228388 | 3.923697 |
0.07 | -0.127566 | 3.899931 |
0.08 | -0.516677 | 3.872644 |
0.09 | -0.931057 | 3.841559 |
0.1 | -1.346455 | 3.806563 |
0.11 | -1.725502 | 3.767856 |
0.12 | -2.033541 | 3.726014 |
0.13 | -2.256013 | 3.681861 |
0.14 | -2.400905 | 3.636245 |
0.15 | -2.487638 | 3.589856 |
... | ... | ... |
99.99 | -0.993297 | -0.366622 |