Last active
February 12, 2016 02:07
-
-
Save domitry/e0bd4c7b3c7835291a9f to your computer and use it in GitHub Desktop.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"true" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"require 'nyaplot'" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"arr = (0..10).to_a" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div id='vis-90452084-8570-431c-9f07-f79cd251d187'></div>\n", | |
"<script>\n", | |
"(function(){\n", | |
" var render = function(){\n", | |
" var model = {\"panes\":[{\"diagrams\":[],\"options\":{}}],\"data\":{},\"extension\":[]}\n", | |
" var id_name = '#vis-90452084-8570-431c-9f07-f79cd251d187';\n", | |
" Nyaplot.core.parse(model, id_name);\n", | |
" };\n", | |
" \n", | |
" var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"http://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n", | |
" path[\"Nyaplot\"] = \"http://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\";\n", | |
"\n", | |
"\n", | |
"\n", | |
" var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n", | |
"\n", | |
" require.config({paths: path, shim:shim});\n", | |
"\n", | |
"\n", | |
" console.log(\"Hello\");\n", | |
" require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n", | |
" console.log(\"HiYo\");\n", | |
" require([\"Nyaplot\"], function(){\n", | |
" console.log(\"Hi\");\n", | |
" render();\n", | |
" });\n", | |
"\n", | |
"});});\n", | |
"})();\n", | |
"</script>\n" | |
], | |
"text/plain": [ | |
"#<Nyaplot::Plot:0x00000001c07078 @properties={:diagrams=>[], :options=>{}}>" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"p = Nyaplot::Plot.new" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Ruby", | |
"language": "ruby", | |
"name": "ruby" | |
}, | |
"language_info": { | |
"file_extension": ".rb", | |
"mimetype": "application/x-ruby", | |
"name": "ruby", | |
"version": "2.1.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment