rbplotly 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 664831e3293f99622b805e266a78d52c80894412
4
+ data.tar.gz: aeabff37f7c64722bc9bf371e321bddecd8fc704
5
+ SHA512:
6
+ metadata.gz: 1db152aafb8bce66f38c593f95019905de703714f9391a4ae51fa18e54a8cb40556fc6d21a02baf01a1e615c8f21f02466a6d0d038366d651b2000613e0e1db5
7
+ data.tar.gz: 12cc74b55053cc764a3be0e92a6f84e6e4a0334f9c07cab0963ccd171990b0d5ccd012039abe4bedfc8c36c75869d54c63c2c0e89e8e3f336d9a96577d6d14e5
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ .ipynb_checkpoints
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+
4
+ Style/FrozenStringLiteralComment:
5
+ Enabled: false
6
+
7
+ LineLength:
8
+ Max: 100
9
+
10
+ MethodLength:
11
+ Max: 15
12
+
13
+ Documentation:
14
+ Enabled: false
15
+
16
+ ParameterLists:
17
+ CountKeywordArgs: false
18
+
19
+ RegexpLiteral:
20
+ Exclude:
21
+ - '**/*.gemspec'
22
+ - '**/Guardfile'
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at y4ashida@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rbplotly.gemspec
4
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,12 @@
1
+ guard :rspec, all_after_pass: true, all_on_start: true, cmd: 'bundle exec rspec' do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
4
+ watch(%r{^lib/(.+?)/.+\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
5
+ watch('spec/spec_helper.rb') { 'spec' }
6
+ watch(%r{^spec/support/.+\.rb$}) { 'spec' }
7
+ end
8
+
9
+ guard :rubocop do
10
+ watch(%r{.+\.rb$})
11
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
12
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 y4ashida
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Rbplotly
2
+
3
+ [Plot.ly](https://plot.ly/) API client and Interface to [plotly.js](https://plot.ly/javascript/).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'rbplotly'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install rbplotly
20
+
21
+ ## Usage
22
+
23
+ ### Plotly Offline
24
+
25
+ ```ruby
26
+ require 'rbplotly'
27
+
28
+ n = 100
29
+
30
+ x = (1...n).map { |i| i.to_f / n }
31
+ y0 = (1...n).map { rand(-2.0...2.0) + 5 }
32
+ y1 = (1...n).map { rand(-2.0...2.0) }
33
+ y2 = (1...n).map { rand(-2.0...2.0) - 5 }
34
+
35
+ trace0 = { x: x, y: y0, type: 'scatter', mode: 'markers' }
36
+ trace1 = trace0.merge(y: y1, mode: 'markers+lines')
37
+ trace2 = trace0.merge(y: y2, mode: 'lines')
38
+
39
+ data = [trace0, trace1, trace2]
40
+
41
+ plot = Plotly::Plot.new(data: data)
42
+
43
+ plot.generate_html(path: './scatter_and_line.html')
44
+ ```
45
+
46
+ ![](./docs/images/scatter_and_line.png)
47
+
48
+ ## Contributing
49
+
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/y4ashida/rbplotly. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
51
+
52
+ ## Thanks
53
+
54
+ `rbplotly` is based on [plotly/plotly.py](https://github.com/plotly/plotly.py), so there are a lot of code coming from it.
55
+
56
+ ## License
57
+
58
+ Copyright (c) 2016 Yoshihiro Ashida. See [LICENSE.txt](LICENSE.txt) for
59
+ further details.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'rbplotly'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require 'pry'
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
Binary file
@@ -0,0 +1,82 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "collapsed": false
8
+ },
9
+ "outputs": [
10
+ {
11
+ "data": {
12
+ "text/html": [
13
+ "\n",
14
+ " <script>\n",
15
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
16
+ " </script>\n",
17
+ "\n",
18
+ "\n",
19
+ "<div id=\"160d0546-7689-4f22-b39f-818b32ca333d\" style=\"height: 100%; width: 100%;\"></div>\n",
20
+ "\n",
21
+ "<script>\n",
22
+ " require(['plotly'], function(Plotly) { \n",
23
+ "Plotly.newPlot(\n",
24
+ " '160d0546-7689-4f22-b39f-818b32ca333d',\n",
25
+ " [{\"x\":[\"giraffes\",\"orangutans\",\"monkeys\"],\"y\":[20,14,23],\"type\":\"bar\",\"name\":null}],\n",
26
+ " {\"xaxis\":{\"title\":null},\"yaxis\":{\"title\":null},\"barmode\":null},\n",
27
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
28
+ ")\n",
29
+ "\n",
30
+ "window.addEventListener('resize', function() {\n",
31
+ " Plotly.Plots.resize(document.getElementById('160d0546-7689-4f22-b39f-818b32ca333d'))\n",
32
+ "})\n",
33
+ " }) \n",
34
+ "</script>"
35
+ ],
36
+ "text/plain": [
37
+ "#<Plotly::Offline::HTML:0x007fe35bb5bb48 @id=\"160d0546-7689-4f22-b39f-818b32ca333d\", @data=[{:x=>[\"giraffes\", \"orangutans\", \"monkeys\"], :y=>[20, 14, 23], :type=>\"bar\", :name=>nil}], @layout={:xaxis=>{:title=>nil}, :yaxis=>{:title=>nil}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
38
+ ]
39
+ },
40
+ "metadata": {},
41
+ "output_type": "display_data"
42
+ }
43
+ ],
44
+ "source": [
45
+ "require 'rbplotly'\n",
46
+ "\n",
47
+ "data = { \n",
48
+ " x: %w(giraffes orangutans monkeys),\n",
49
+ " y: [20, 14, 23],\n",
50
+ " type: 'bar'\n",
51
+ "}\n",
52
+ "\n",
53
+ "plot = Plotly::Plot.new(data: [data])\n",
54
+ "plot.show"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "code",
59
+ "execution_count": null,
60
+ "metadata": {
61
+ "collapsed": true
62
+ },
63
+ "outputs": [],
64
+ "source": []
65
+ }
66
+ ],
67
+ "metadata": {
68
+ "kernelspec": {
69
+ "display_name": "Ruby 2.3.1",
70
+ "language": "ruby",
71
+ "name": "ruby"
72
+ },
73
+ "language_info": {
74
+ "file_extension": ".rb",
75
+ "mimetype": "application/x-ruby",
76
+ "name": "ruby",
77
+ "version": "2.3.1"
78
+ }
79
+ },
80
+ "nbformat": 4,
81
+ "nbformat_minor": 1
82
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "collapsed": false
8
+ },
9
+ "outputs": [
10
+ {
11
+ "data": {
12
+ "text/html": [
13
+ "\n",
14
+ " <script>\n",
15
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
16
+ " </script>\n",
17
+ "\n",
18
+ "\n",
19
+ "<div id=\"f36d8d99-c992-4586-8674-6f9fc7fd7d33\" style=\"height: 100%; width: 100%;\"></div>\n",
20
+ "\n",
21
+ "<script>\n",
22
+ " require(['plotly'], function(Plotly) { \n",
23
+ "Plotly.newPlot(\n",
24
+ " 'f36d8d99-c992-4586-8674-6f9fc7fd7d33',\n",
25
+ " [{\"x\":[\"giraffes\",\"orangutans\",\"monkeys\"],\"y\":[20,14,23],\"type\":\"bar\",\"name\":\"SF Zoo\"},{\"x\":[\"giraffes\",\"orangutans\",\"monkeys\"],\"y\":[12,18,29],\"type\":\"bar\",\"name\":\"LA Zoo\"}],\n",
26
+ " {\"xaxis\":{\"title\":null},\"yaxis\":{\"title\":null},\"barmode\":null},\n",
27
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
28
+ ")\n",
29
+ "\n",
30
+ "window.addEventListener('resize', function() {\n",
31
+ " Plotly.Plots.resize(document.getElementById('f36d8d99-c992-4586-8674-6f9fc7fd7d33'))\n",
32
+ "})\n",
33
+ " }) \n",
34
+ "</script>"
35
+ ],
36
+ "text/plain": [
37
+ "#<Plotly::Offline::HTML:0x007fde2ab37850 @id=\"f36d8d99-c992-4586-8674-6f9fc7fd7d33\", @data=[{:x=>[\"giraffes\", \"orangutans\", \"monkeys\"], :y=>[20, 14, 23], :type=>\"bar\", :name=>\"SF Zoo\"}, {:x=>[\"giraffes\", \"orangutans\", \"monkeys\"], :y=>[12, 18, 29], :type=>\"bar\", :name=>\"LA Zoo\"}], @layout={:xaxis=>{:title=>nil}, :yaxis=>{:title=>nil}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
38
+ ]
39
+ },
40
+ "metadata": {},
41
+ "output_type": "display_data"
42
+ }
43
+ ],
44
+ "source": [
45
+ "require 'rbplotly'\n",
46
+ "\n",
47
+ "trace1 = {\n",
48
+ " x: %w(giraffes orangutans monkeys),\n",
49
+ " y: [20, 14, 23],\n",
50
+ " type: 'bar',\n",
51
+ " name: 'SF Zoo'\n",
52
+ "}\n",
53
+ "trace2 = {\n",
54
+ " x: %w(giraffes orangutans monkeys),\n",
55
+ " y: [12, 18, 29],\n",
56
+ " type: 'bar',\n",
57
+ " name: 'LA Zoo'\n",
58
+ "}\n",
59
+ "\n",
60
+ "plot = Plotly::Plot.new(data: [trace1, trace2])\n",
61
+ "plot.show"
62
+ ]
63
+ },
64
+ {
65
+ "cell_type": "code",
66
+ "execution_count": null,
67
+ "metadata": {
68
+ "collapsed": true
69
+ },
70
+ "outputs": [],
71
+ "source": []
72
+ }
73
+ ],
74
+ "metadata": {
75
+ "kernelspec": {
76
+ "display_name": "Ruby 2.3.1",
77
+ "language": "ruby",
78
+ "name": "ruby"
79
+ },
80
+ "language_info": {
81
+ "file_extension": ".rb",
82
+ "mimetype": "application/x-ruby",
83
+ "name": "ruby",
84
+ "version": "2.3.1"
85
+ }
86
+ },
87
+ "nbformat": 4,
88
+ "nbformat_minor": 1
89
+ }
@@ -0,0 +1,227 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "collapsed": false
8
+ },
9
+ "outputs": [
10
+ {
11
+ "data": {
12
+ "text/html": [
13
+ "\n",
14
+ " <script>\n",
15
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
16
+ " </script>\n",
17
+ "\n",
18
+ "\n",
19
+ "<div id=\"a01805df-6bc1-43cf-bc24-0a4be7a612f1\" style=\"height: 100%; width: 100%;\"></div>\n",
20
+ "\n",
21
+ "<script>\n",
22
+ " require(['plotly'], function(Plotly) { \n",
23
+ "Plotly.newPlot(\n",
24
+ " 'a01805df-6bc1-43cf-bc24-0a4be7a612f1',\n",
25
+ " [{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[6.06809285761007,4.636906940962931,4.330238700807152,6.85050915666477,5.637207641802593,3.0076509876375916,5.417454930894399,5.443022499433825,3.715316760902408,6.298674809155711,4.718312623658639,6.557116204337994,5.469046768754387,3.3049464361471617,6.829346551172675,6.731500252491528,4.013521570529813,4.390503115116513,3.281004078174436,3.157165622484809,5.5608357321768445,6.453711025735326,4.638198597470634,6.7230530169591205,4.883533276073177,6.048195101973394,3.603643650024981,4.978721058770721,5.5344086262496734,4.048160751938436,6.836825542568651,5.368305070686512,4.938040527237902,5.19760847050968,4.642821434293228,5.176004689301651,5.440899388049205,6.564135894882811,6.667977718474269,3.1457827461494037,4.367390807654569,3.113026263177005,4.557801032096629,3.0548050244087084,4.555071033697201,6.477634588624724,4.383769287513611,4.4867713393020985,4.5366323781849545,5.790113140231682,3.569408452958307,5.024582366959441,4.716869920830076,5.303160673283337,6.259770964723529,3.5676433050694474,3.4686674839576703,4.195307375357299,5.1704024042712025,4.0132893828576695,4.927397951548005,3.4914506084576087,6.724434760757954,5.034318208474589,6.997859951137011,4.950615251862406,5.026669478709405,6.467537845224117,6.34093065366986,4.128664041905479,4.044395313327865,6.852280309768207,3.8676352287365163,3.6953535418490078,3.1410597684975263,6.280960018648205,4.4218603241692085,6.427396422756709,4.457080339196608,6.288199388971066,3.136795000680894,4.737643745031619,5.003841502314865,5.353742367063637,5.225903938911866,5.524262200476983,6.936354879361975,3.8522611646409093,3.33426886156358,6.14171347176754,4.549846351320822,5.395150805727262,4.288594239916755,3.5435448270376217,4.461613936682362,3.2954332079609587,5.774661534071372,4.699295399407788,4.136828275172596,3.002066290677958,5.774275028520613],\"type\":\"scatter\",\"mode\":\"markers\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[0.575448245668837,-1.2913007269694,-1.0883672308303378,0.925931634065285,-1.990672087860125,0.4144156500313838,1.301149780362044,-0.4780932930493038,0.8509370149061155,-0.05538635310396467,-1.1620595642459293,0.7655668767966861,-0.3129148101518786,1.6759091202529355,-1.6507306887754551,-0.04211878273756797,0.9867290587584061,-0.728495768874792,-1.4971784584882517,1.9494032142672606,-0.6728581770146933,-0.31619045302083926,0.10302392867141386,0.6094672663366656,1.0837361226671058,-0.534622481290012,-1.624192750751614,1.5966786494186476,1.642178878440951,1.1714215145063038,-1.2393790163163758,-1.2012832296295568,-1.7554776390646807,1.6894315028599478,-1.4797909953748962,-0.8904589964385279,-1.8585849153572105,1.7751263792278893,-1.1402048298527556,-1.7048898126600305,1.2091255747682097,0.10589224431365585,1.8419365940246348,-0.08062852007849841,1.6124021194544604,1.2355682777121157,1.1980256675588175,0.4533612669683058,-1.0381472347580338,0.7405048992762873,0.7770297424349737,-1.9170704161113048,-0.23025672108441864,-0.006764675160311651,1.954575419137346,1.185333742718715,-1.1293433862647269,1.782239198966046,-0.6829180241316171,-1.9281645199948119,-1.5699637313720318,0.5986368667946373,0.09236586930780977,-0.48813233791264476,0.609016242650875,-1.019971339164654,-1.1265617012519824,0.3561096215117514,1.9453748711980836,-1.0455689946098028,-0.9083528882913239,0.7315074284468666,-1.7588454520343033,-0.3093283004489704,-0.8955866187239088,-0.5390135607120299,-0.7766031451433499,1.1294479127430308,-1.196993977713766,-1.7571465084396385,-1.0114689248486668,1.2143426093649947,1.7749759498303486,0.9049925054225341,-1.3878690721932543,1.2711528810013748,0.3782777869131779,0.4601748935210699,0.49109467242532867,1.3723307687423212,0.8378969181095068,-0.2819110549022583,-1.4274734193007772,1.975747154742355,0.9163681359982898,0.8593801284223357,1.7688368051704564,0.3315368097241702,-0.5143571462399836,-1.6554548127882098,1.5771525428189355],\"type\":\"scatter\",\"mode\":\"markers+lines\",\"name\":null}],\n",
26
+ " {\"xaxis\":{\"title\":null},\"yaxis\":{\"title\":null},\"barmode\":null},\n",
27
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
28
+ ")\n",
29
+ "\n",
30
+ "window.addEventListener('resize', function() {\n",
31
+ " Plotly.Plots.resize(document.getElementById('a01805df-6bc1-43cf-bc24-0a4be7a612f1'))\n",
32
+ "})\n",
33
+ " }) \n",
34
+ "</script>"
35
+ ],
36
+ "text/plain": [
37
+ "#<Plotly::Offline::HTML:0x007ff3931f4aa8 @id=\"a01805df-6bc1-43cf-bc24-0a4be7a612f1\", @data=[{:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[6.06809285761007, 4.636906940962931, 4.330238700807152, 6.85050915666477, 5.637207641802593, 3.0076509876375916, 5.417454930894399, 5.443022499433825, 3.715316760902408, 6.298674809155711, 4.718312623658639, 6.557116204337994, 5.469046768754387, 3.3049464361471617, 6.829346551172675, 6.731500252491528, 4.013521570529813, 4.390503115116513, 3.281004078174436, 3.157165622484809, 5.5608357321768445, 6.453711025735326, 4.638198597470634, 6.7230530169591205, 4.883533276073177, 6.048195101973394, 3.603643650024981, 4.978721058770721, 5.5344086262496734, 4.048160751938436, 6.836825542568651, 5.368305070686512, 4.938040527237902, 5.19760847050968, 4.642821434293228, 5.176004689301651, 5.440899388049205, 6.564135894882811, 6.667977718474269, 3.1457827461494037, 4.367390807654569, 3.113026263177005, 4.557801032096629, 3.0548050244087084, 4.555071033697201, 6.477634588624724, 4.383769287513611, 4.4867713393020985, 4.5366323781849545, 5.790113140231682, 3.569408452958307, 5.024582366959441, 4.716869920830076, 5.303160673283337, 6.259770964723529, 3.5676433050694474, 3.4686674839576703, 4.195307375357299, 5.1704024042712025, 4.0132893828576695, 4.927397951548005, 3.4914506084576087, 6.724434760757954, 5.034318208474589, 6.997859951137011, 4.950615251862406, 5.026669478709405, 6.467537845224117, 6.34093065366986, 4.128664041905479, 4.044395313327865, 6.852280309768207, 3.8676352287365163, 3.6953535418490078, 3.1410597684975263, 6.280960018648205, 4.4218603241692085, 6.427396422756709, 4.457080339196608, 6.288199388971066, 3.136795000680894, 4.737643745031619, 5.003841502314865, 5.353742367063637, 5.225903938911866, 5.524262200476983, 6.936354879361975, 3.8522611646409093, 3.33426886156358, 6.14171347176754, 4.549846351320822, 5.395150805727262, 4.288594239916755, 3.5435448270376217, 4.461613936682362, 3.2954332079609587, 5.774661534071372, 4.699295399407788, 4.136828275172596, 3.002066290677958, 5.774275028520613], :type=>\"scatter\", :mode=>\"markers\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[0.575448245668837, -1.2913007269694, -1.0883672308303378, 0.925931634065285, -1.990672087860125, 0.4144156500313838, 1.301149780362044, -0.4780932930493038, 0.8509370149061155, -0.05538635310396467, -1.1620595642459293, 0.7655668767966861, -0.3129148101518786, 1.6759091202529355, -1.6507306887754551, -0.04211878273756797, 0.9867290587584061, -0.728495768874792, -1.4971784584882517, 1.9494032142672606, -0.6728581770146933, -0.31619045302083926, 0.10302392867141386, 0.6094672663366656, 1.0837361226671058, -0.534622481290012, -1.624192750751614, 1.5966786494186476, 1.642178878440951, 1.1714215145063038, -1.2393790163163758, -1.2012832296295568, -1.7554776390646807, 1.6894315028599478, -1.4797909953748962, -0.8904589964385279, -1.8585849153572105, 1.7751263792278893, -1.1402048298527556, -1.7048898126600305, 1.2091255747682097, 0.10589224431365585, 1.8419365940246348, -0.08062852007849841, 1.6124021194544604, 1.2355682777121157, 1.1980256675588175, 0.4533612669683058, -1.0381472347580338, 0.7405048992762873, 0.7770297424349737, -1.9170704161113048, -0.23025672108441864, -0.006764675160311651, 1.954575419137346, 1.185333742718715, -1.1293433862647269, 1.782239198966046, -0.6829180241316171, -1.9281645199948119, -1.5699637313720318, 0.5986368667946373, 0.09236586930780977, -0.48813233791264476, 0.609016242650875, -1.019971339164654, -1.1265617012519824, 0.3561096215117514, 1.9453748711980836, -1.0455689946098028, -0.9083528882913239, 0.7315074284468666, -1.7588454520343033, -0.3093283004489704, -0.8955866187239088, -0.5390135607120299, -0.7766031451433499, 1.1294479127430308, -1.196993977713766, -1.7571465084396385, -1.0114689248486668, 1.2143426093649947, 1.7749759498303486, 0.9049925054225341, -1.3878690721932543, 1.2711528810013748, 0.3782777869131779, 0.4601748935210699, 0.49109467242532867, 1.3723307687423212, 0.8378969181095068, -0.2819110549022583, -1.4274734193007772, 1.975747154742355, 0.9163681359982898, 0.8593801284223357, 1.7688368051704564, 0.3315368097241702, -0.5143571462399836, -1.6554548127882098, 1.5771525428189355], :type=>\"scatter\", :mode=>\"markers+lines\", :name=>nil}], @layout={:xaxis=>{:title=>nil}, :yaxis=>{:title=>nil}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
38
+ ]
39
+ },
40
+ "metadata": {},
41
+ "output_type": "display_data"
42
+ }
43
+ ],
44
+ "source": [
45
+ "require 'rbplotly'\n",
46
+ "\n",
47
+ "n = 100\n",
48
+ "\n",
49
+ "x = (0..n).map { |i| i.to_f / n }\n",
50
+ "y0 = (0..n).map { rand(-2.0..2.0) + 5 }\n",
51
+ "y1 = (0..n).map { rand(-2.0..2.0) }\n",
52
+ "\n",
53
+ "trace0 = { x: x, y: y0, type: 'scatter', mode: 'markers' }\n",
54
+ "trace1 = trace0.merge(y: y1, mode: 'markers+lines')\n",
55
+ "\n",
56
+ "plot = Plotly::Plot.new(data: [trace0, trace1])\n",
57
+ "plot.show"
58
+ ]
59
+ },
60
+ {
61
+ "cell_type": "code",
62
+ "execution_count": 2,
63
+ "metadata": {
64
+ "collapsed": false
65
+ },
66
+ "outputs": [
67
+ {
68
+ "data": {
69
+ "text/html": [
70
+ "\n",
71
+ " <script>\n",
72
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
73
+ " </script>\n",
74
+ "\n",
75
+ "\n",
76
+ "<div id=\"8186a545-eb2e-42da-8f9d-496b05587c14\" style=\"height: 100%; width: 100%;\"></div>\n",
77
+ "\n",
78
+ "<script>\n",
79
+ " require(['plotly'], function(Plotly) { \n",
80
+ "Plotly.newPlot(\n",
81
+ " '8186a545-eb2e-42da-8f9d-496b05587c14',\n",
82
+ " [{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[6.06809285761007,4.636906940962931,4.330238700807152,6.85050915666477,5.637207641802593,3.0076509876375916,5.417454930894399,5.443022499433825,3.715316760902408,6.298674809155711,4.718312623658639,6.557116204337994,5.469046768754387,3.3049464361471617,6.829346551172675,6.731500252491528,4.013521570529813,4.390503115116513,3.281004078174436,3.157165622484809,5.5608357321768445,6.453711025735326,4.638198597470634,6.7230530169591205,4.883533276073177,6.048195101973394,3.603643650024981,4.978721058770721,5.5344086262496734,4.048160751938436,6.836825542568651,5.368305070686512,4.938040527237902,5.19760847050968,4.642821434293228,5.176004689301651,5.440899388049205,6.564135894882811,6.667977718474269,3.1457827461494037,4.367390807654569,3.113026263177005,4.557801032096629,3.0548050244087084,4.555071033697201,6.477634588624724,4.383769287513611,4.4867713393020985,4.5366323781849545,5.790113140231682,3.569408452958307,5.024582366959441,4.716869920830076,5.303160673283337,6.259770964723529,3.5676433050694474,3.4686674839576703,4.195307375357299,5.1704024042712025,4.0132893828576695,4.927397951548005,3.4914506084576087,6.724434760757954,5.034318208474589,6.997859951137011,4.950615251862406,5.026669478709405,6.467537845224117,6.34093065366986,4.128664041905479,4.044395313327865,6.852280309768207,3.8676352287365163,3.6953535418490078,3.1410597684975263,6.280960018648205,4.4218603241692085,6.427396422756709,4.457080339196608,6.288199388971066,3.136795000680894,4.737643745031619,5.003841502314865,5.353742367063637,5.225903938911866,5.524262200476983,6.936354879361975,3.8522611646409093,3.33426886156358,6.14171347176754,4.549846351320822,5.395150805727262,4.288594239916755,3.5435448270376217,4.461613936682362,3.2954332079609587,5.774661534071372,4.699295399407788,4.136828275172596,3.002066290677958,5.774275028520613],\"type\":\"scatter\",\"mode\":\"markers\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[0.4999749917031834,-0.4445463462560286,0.031638412284818784,-0.49576531125495504,-0.3277243828008579,0.06670705046336822,0.1752857306002663,0.34193950767171666,0.39023097455246314,-0.19115917761871015,0.21347259965535093,0.2766775489316884,0.11711757480736318,-0.3221176774416923,0.3998375121886233,-0.3326877663333745,-0.3243725224569931,0.4402976908826519,-0.4636709124591881,-0.12185444125912126,0.25769136313862995,-0.2260010225369099,0.36568344107316386,-0.2835553120072478,0.4141194809047899,-0.2906732596138044,-0.2745943708041504,0.13295626888761392,0.044224177456627656,0.11280341107735625,-0.2847848472001461,0.010810164898679697,0.4430960874098264,0.44510689658155944,-0.3250162293093748,-0.42569561393228295,0.176934147424762,-0.22041304525187988,-0.3708258728062167,0.37421720803204284,0.37336304570842727,-0.3375070080564796,-0.48805917215433836,-0.09341884036162584,0.271520037834762,0.0663046089251158,-0.23344372098150723,0.3566617434021181,-0.20608507044252944,0.22567425302748556,0.08747933362309834,0.16248224548311374,0.3898539794927276,0.28049768847279744,-0.39778778046455665,-0.28496333158069864,0.4184036044235936,0.22966930082478165,-0.3843896763389939,-0.47566098556897607,0.23942794683703128,0.372490203798722,-0.35975500535936356,-0.0007846511812865664,-0.4508984819338695,-0.14715580489970503,-0.47399888180047367,0.023365155585409303,-0.044457849151365414,-0.16029491929067508,0.3626493843019245,-0.0628185896484118,0.2746881229165653,-0.061919407158804174,0.37920498072695363,0.1573046839111295,-0.2735701013635866,-0.39887565100894284,0.13030121275149986,-0.09360742933232558,-0.019383504431448983,0.339647488167769,0.19122124281050434,0.26386447808472435,0.0995379439291455,-0.32392013264171615,0.3682014091620076,0.3758137802054268,0.1560115260653514,0.24476963785519756,0.3780061420458657,0.3763129097471267,-0.4070774371511311,-0.4006047099446409,-0.38837883268386875,-0.07715962729754255,-0.3534383805440712,0.46280698192032244,0.1856968028571354,-0.42508648014039985,0.03224546604232581],\"type\":\"scatter\",\"mode\":\"markers+lines\",\"name\":null}],\n",
83
+ " {\"xaxis\":{\"title\":null},\"yaxis\":{\"title\":null},\"barmode\":null},\n",
84
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
85
+ ")\n",
86
+ "\n",
87
+ "window.addEventListener('resize', function() {\n",
88
+ " Plotly.Plots.resize(document.getElementById('8186a545-eb2e-42da-8f9d-496b05587c14'))\n",
89
+ "})\n",
90
+ " }) \n",
91
+ "</script>"
92
+ ],
93
+ "text/plain": [
94
+ "#<Plotly::Offline::HTML:0x007ff392261d48 @id=\"8186a545-eb2e-42da-8f9d-496b05587c14\", @data=[{:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[6.06809285761007, 4.636906940962931, 4.330238700807152, 6.85050915666477, 5.637207641802593, 3.0076509876375916, 5.417454930894399, 5.443022499433825, 3.715316760902408, 6.298674809155711, 4.718312623658639, 6.557116204337994, 5.469046768754387, 3.3049464361471617, 6.829346551172675, 6.731500252491528, 4.013521570529813, 4.390503115116513, 3.281004078174436, 3.157165622484809, 5.5608357321768445, 6.453711025735326, 4.638198597470634, 6.7230530169591205, 4.883533276073177, 6.048195101973394, 3.603643650024981, 4.978721058770721, 5.5344086262496734, 4.048160751938436, 6.836825542568651, 5.368305070686512, 4.938040527237902, 5.19760847050968, 4.642821434293228, 5.176004689301651, 5.440899388049205, 6.564135894882811, 6.667977718474269, 3.1457827461494037, 4.367390807654569, 3.113026263177005, 4.557801032096629, 3.0548050244087084, 4.555071033697201, 6.477634588624724, 4.383769287513611, 4.4867713393020985, 4.5366323781849545, 5.790113140231682, 3.569408452958307, 5.024582366959441, 4.716869920830076, 5.303160673283337, 6.259770964723529, 3.5676433050694474, 3.4686674839576703, 4.195307375357299, 5.1704024042712025, 4.0132893828576695, 4.927397951548005, 3.4914506084576087, 6.724434760757954, 5.034318208474589, 6.997859951137011, 4.950615251862406, 5.026669478709405, 6.467537845224117, 6.34093065366986, 4.128664041905479, 4.044395313327865, 6.852280309768207, 3.8676352287365163, 3.6953535418490078, 3.1410597684975263, 6.280960018648205, 4.4218603241692085, 6.427396422756709, 4.457080339196608, 6.288199388971066, 3.136795000680894, 4.737643745031619, 5.003841502314865, 5.353742367063637, 5.225903938911866, 5.524262200476983, 6.936354879361975, 3.8522611646409093, 3.33426886156358, 6.14171347176754, 4.549846351320822, 5.395150805727262, 4.288594239916755, 3.5435448270376217, 4.461613936682362, 3.2954332079609587, 5.774661534071372, 4.699295399407788, 4.136828275172596, 3.002066290677958, 5.774275028520613], :type=>\"scatter\", :mode=>\"markers\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[0.4999749917031834, -0.4445463462560286, 0.031638412284818784, -0.49576531125495504, -0.3277243828008579, 0.06670705046336822, 0.1752857306002663, 0.34193950767171666, 0.39023097455246314, -0.19115917761871015, 0.21347259965535093, 0.2766775489316884, 0.11711757480736318, -0.3221176774416923, 0.3998375121886233, -0.3326877663333745, -0.3243725224569931, 0.4402976908826519, -0.4636709124591881, -0.12185444125912126, 0.25769136313862995, -0.2260010225369099, 0.36568344107316386, -0.2835553120072478, 0.4141194809047899, -0.2906732596138044, -0.2745943708041504, 0.13295626888761392, 0.044224177456627656, 0.11280341107735625, -0.2847848472001461, 0.010810164898679697, 0.4430960874098264, 0.44510689658155944, -0.3250162293093748, -0.42569561393228295, 0.176934147424762, -0.22041304525187988, -0.3708258728062167, 0.37421720803204284, 0.37336304570842727, -0.3375070080564796, -0.48805917215433836, -0.09341884036162584, 0.271520037834762, 0.0663046089251158, -0.23344372098150723, 0.3566617434021181, -0.20608507044252944, 0.22567425302748556, 0.08747933362309834, 0.16248224548311374, 0.3898539794927276, 0.28049768847279744, -0.39778778046455665, -0.28496333158069864, 0.4184036044235936, 0.22966930082478165, -0.3843896763389939, -0.47566098556897607, 0.23942794683703128, 0.372490203798722, -0.35975500535936356, -0.0007846511812865664, -0.4508984819338695, -0.14715580489970503, -0.47399888180047367, 0.023365155585409303, -0.044457849151365414, -0.16029491929067508, 0.3626493843019245, -0.0628185896484118, 0.2746881229165653, -0.061919407158804174, 0.37920498072695363, 0.1573046839111295, -0.2735701013635866, -0.39887565100894284, 0.13030121275149986, -0.09360742933232558, -0.019383504431448983, 0.339647488167769, 0.19122124281050434, 0.26386447808472435, 0.0995379439291455, -0.32392013264171615, 0.3682014091620076, 0.3758137802054268, 0.1560115260653514, 0.24476963785519756, 0.3780061420458657, 0.3763129097471267, -0.4070774371511311, -0.4006047099446409, -0.38837883268386875, -0.07715962729754255, -0.3534383805440712, 0.46280698192032244, 0.1856968028571354, -0.42508648014039985, 0.03224546604232581], :type=>\"scatter\", :mode=>\"markers+lines\", :name=>nil}], @layout={:xaxis=>{:title=>nil}, :yaxis=>{:title=>nil}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
95
+ ]
96
+ },
97
+ "metadata": {},
98
+ "output_type": "display_data"
99
+ }
100
+ ],
101
+ "source": [
102
+ "plot.data.last.y = (0..n).map { rand(-0.5..0.5) }\n",
103
+ "plot.show"
104
+ ]
105
+ },
106
+ {
107
+ "cell_type": "code",
108
+ "execution_count": 3,
109
+ "metadata": {
110
+ "collapsed": false
111
+ },
112
+ "outputs": [
113
+ {
114
+ "data": {
115
+ "text/html": [
116
+ "\n",
117
+ " <script>\n",
118
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
119
+ " </script>\n",
120
+ "\n",
121
+ "\n",
122
+ "<div id=\"dc500b8d-14b5-4fbd-bbf4-f348f29d46c7\" style=\"height: 100%; width: 100%;\"></div>\n",
123
+ "\n",
124
+ "<script>\n",
125
+ " require(['plotly'], function(Plotly) { \n",
126
+ "Plotly.newPlot(\n",
127
+ " 'dc500b8d-14b5-4fbd-bbf4-f348f29d46c7',\n",
128
+ " [{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[6.06809285761007,4.636906940962931,4.330238700807152,6.85050915666477,5.637207641802593,3.0076509876375916,5.417454930894399,5.443022499433825,3.715316760902408,6.298674809155711,4.718312623658639,6.557116204337994,5.469046768754387,3.3049464361471617,6.829346551172675,6.731500252491528,4.013521570529813,4.390503115116513,3.281004078174436,3.157165622484809,5.5608357321768445,6.453711025735326,4.638198597470634,6.7230530169591205,4.883533276073177,6.048195101973394,3.603643650024981,4.978721058770721,5.5344086262496734,4.048160751938436,6.836825542568651,5.368305070686512,4.938040527237902,5.19760847050968,4.642821434293228,5.176004689301651,5.440899388049205,6.564135894882811,6.667977718474269,3.1457827461494037,4.367390807654569,3.113026263177005,4.557801032096629,3.0548050244087084,4.555071033697201,6.477634588624724,4.383769287513611,4.4867713393020985,4.5366323781849545,5.790113140231682,3.569408452958307,5.024582366959441,4.716869920830076,5.303160673283337,6.259770964723529,3.5676433050694474,3.4686674839576703,4.195307375357299,5.1704024042712025,4.0132893828576695,4.927397951548005,3.4914506084576087,6.724434760757954,5.034318208474589,6.997859951137011,4.950615251862406,5.026669478709405,6.467537845224117,6.34093065366986,4.128664041905479,4.044395313327865,6.852280309768207,3.8676352287365163,3.6953535418490078,3.1410597684975263,6.280960018648205,4.4218603241692085,6.427396422756709,4.457080339196608,6.288199388971066,3.136795000680894,4.737643745031619,5.003841502314865,5.353742367063637,5.225903938911866,5.524262200476983,6.936354879361975,3.8522611646409093,3.33426886156358,6.14171347176754,4.549846351320822,5.395150805727262,4.288594239916755,3.5435448270376217,4.461613936682362,3.2954332079609587,5.774661534071372,4.699295399407788,4.136828275172596,3.002066290677958,5.774275028520613],\"type\":\"scatter\",\"mode\":\"markers\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[0.4999749917031834,-0.4445463462560286,0.031638412284818784,-0.49576531125495504,-0.3277243828008579,0.06670705046336822,0.1752857306002663,0.34193950767171666,0.39023097455246314,-0.19115917761871015,0.21347259965535093,0.2766775489316884,0.11711757480736318,-0.3221176774416923,0.3998375121886233,-0.3326877663333745,-0.3243725224569931,0.4402976908826519,-0.4636709124591881,-0.12185444125912126,0.25769136313862995,-0.2260010225369099,0.36568344107316386,-0.2835553120072478,0.4141194809047899,-0.2906732596138044,-0.2745943708041504,0.13295626888761392,0.044224177456627656,0.11280341107735625,-0.2847848472001461,0.010810164898679697,0.4430960874098264,0.44510689658155944,-0.3250162293093748,-0.42569561393228295,0.176934147424762,-0.22041304525187988,-0.3708258728062167,0.37421720803204284,0.37336304570842727,-0.3375070080564796,-0.48805917215433836,-0.09341884036162584,0.271520037834762,0.0663046089251158,-0.23344372098150723,0.3566617434021181,-0.20608507044252944,0.22567425302748556,0.08747933362309834,0.16248224548311374,0.3898539794927276,0.28049768847279744,-0.39778778046455665,-0.28496333158069864,0.4184036044235936,0.22966930082478165,-0.3843896763389939,-0.47566098556897607,0.23942794683703128,0.372490203798722,-0.35975500535936356,-0.0007846511812865664,-0.4508984819338695,-0.14715580489970503,-0.47399888180047367,0.023365155585409303,-0.044457849151365414,-0.16029491929067508,0.3626493843019245,-0.0628185896484118,0.2746881229165653,-0.061919407158804174,0.37920498072695363,0.1573046839111295,-0.2735701013635866,-0.39887565100894284,0.13030121275149986,-0.09360742933232558,-0.019383504431448983,0.339647488167769,0.19122124281050434,0.26386447808472435,0.0995379439291455,-0.32392013264171615,0.3682014091620076,0.3758137802054268,0.1560115260653514,0.24476963785519756,0.3780061420458657,0.3763129097471267,-0.4070774371511311,-0.4006047099446409,-0.38837883268386875,-0.07715962729754255,-0.3534383805440712,0.46280698192032244,0.1856968028571354,-0.42508648014039985,0.03224546604232581],\"type\":\"scatter\",\"mode\":\"markers+lines\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[-5.846856174320979,-3.234478143579401,-5.552227408357112,-4.979695035119516,-4.913974844590642,-5.187485075314687,-3.9555441073206192,-4.406746479672281,-6.119219620464968,-5.955675271510724,-4.539960552394012,-4.704256903388545,-3.9931310439507484,-6.68728173581632,-4.394516320923964,-4.616968672905619,-4.857744356438591,-5.247628340560906,-6.622419461146887,-6.960807487645317,-3.4853139639262025,-5.99723954157834,-6.53606062416722,-6.649049258973229,-5.764517914834626,-5.737207238295772,-3.010787204860319,-3.451395531452444,-3.7066559735596507,-3.1186909365773436,-3.1396231157993273,-5.3782829265003755,-3.935284837645618,-6.024865970142729,-6.724467891163727,-5.513475907392143,-4.85260194977997,-6.755424526916375,-6.019254506835878,-4.40994977774559,-3.9427346632532188,-6.168059928754172,-5.574523515758051,-4.571429320998886,-4.680454973728613,-5.476346771862001,-3.0076998061733913,-4.863237353200526,-5.688976433812603,-5.378254174926265,-3.050144184300954,-5.978780037734728,-3.5169858706129795,-5.718728117704011,-6.588916624659957,-3.5718842365746126,-5.713056212462586,-4.27029242488004,-6.90087885672887,-4.3818801837537915,-5.206812257850277,-5.350507050601187,-3.4570891424019123,-4.851113044943986,-4.992154310102163,-5.893432025446119,-4.77229051345145,-3.250079300462318,-3.0187638673197683,-5.515251987783209,-6.452251877650439,-3.0042288550849627,-3.403773514543825,-3.4667446598240867,-3.1738135113794614,-5.860381672695365,-5.0264855666595265,-5.291998846198721,-4.649238579559311,-4.256162483726853,-4.226965594562555,-4.487567600631907,-6.897746289702152,-4.892679999967271,-6.818509118675378,-3.4515901611321045,-3.7614637500641264,-4.211937423217915,-5.6307705672489075,-4.222007689926757,-3.8585261353483107,-3.260327792449652,-3.4967053121657443,-3.784953215998026,-5.245191884132513,-6.117494203591765,-3.338260214521552,-4.249588426402086,-5.51326793977587,-4.765168061337585,-5.3214737024153855],\"type\":\"scatter\",\"mode\":\"lines\",\"name\":null}],\n",
129
+ " {\"xaxis\":{\"title\":null},\"yaxis\":{\"title\":null},\"barmode\":null},\n",
130
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
131
+ ")\n",
132
+ "\n",
133
+ "window.addEventListener('resize', function() {\n",
134
+ " Plotly.Plots.resize(document.getElementById('dc500b8d-14b5-4fbd-bbf4-f348f29d46c7'))\n",
135
+ "})\n",
136
+ " }) \n",
137
+ "</script>"
138
+ ],
139
+ "text/plain": [
140
+ "#<Plotly::Offline::HTML:0x007ff392209f08 @id=\"dc500b8d-14b5-4fbd-bbf4-f348f29d46c7\", @data=[{:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[6.06809285761007, 4.636906940962931, 4.330238700807152, 6.85050915666477, 5.637207641802593, 3.0076509876375916, 5.417454930894399, 5.443022499433825, 3.715316760902408, 6.298674809155711, 4.718312623658639, 6.557116204337994, 5.469046768754387, 3.3049464361471617, 6.829346551172675, 6.731500252491528, 4.013521570529813, 4.390503115116513, 3.281004078174436, 3.157165622484809, 5.5608357321768445, 6.453711025735326, 4.638198597470634, 6.7230530169591205, 4.883533276073177, 6.048195101973394, 3.603643650024981, 4.978721058770721, 5.5344086262496734, 4.048160751938436, 6.836825542568651, 5.368305070686512, 4.938040527237902, 5.19760847050968, 4.642821434293228, 5.176004689301651, 5.440899388049205, 6.564135894882811, 6.667977718474269, 3.1457827461494037, 4.367390807654569, 3.113026263177005, 4.557801032096629, 3.0548050244087084, 4.555071033697201, 6.477634588624724, 4.383769287513611, 4.4867713393020985, 4.5366323781849545, 5.790113140231682, 3.569408452958307, 5.024582366959441, 4.716869920830076, 5.303160673283337, 6.259770964723529, 3.5676433050694474, 3.4686674839576703, 4.195307375357299, 5.1704024042712025, 4.0132893828576695, 4.927397951548005, 3.4914506084576087, 6.724434760757954, 5.034318208474589, 6.997859951137011, 4.950615251862406, 5.026669478709405, 6.467537845224117, 6.34093065366986, 4.128664041905479, 4.044395313327865, 6.852280309768207, 3.8676352287365163, 3.6953535418490078, 3.1410597684975263, 6.280960018648205, 4.4218603241692085, 6.427396422756709, 4.457080339196608, 6.288199388971066, 3.136795000680894, 4.737643745031619, 5.003841502314865, 5.353742367063637, 5.225903938911866, 5.524262200476983, 6.936354879361975, 3.8522611646409093, 3.33426886156358, 6.14171347176754, 4.549846351320822, 5.395150805727262, 4.288594239916755, 3.5435448270376217, 4.461613936682362, 3.2954332079609587, 5.774661534071372, 4.699295399407788, 4.136828275172596, 3.002066290677958, 5.774275028520613], :type=>\"scatter\", :mode=>\"markers\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[0.4999749917031834, -0.4445463462560286, 0.031638412284818784, -0.49576531125495504, -0.3277243828008579, 0.06670705046336822, 0.1752857306002663, 0.34193950767171666, 0.39023097455246314, -0.19115917761871015, 0.21347259965535093, 0.2766775489316884, 0.11711757480736318, -0.3221176774416923, 0.3998375121886233, -0.3326877663333745, -0.3243725224569931, 0.4402976908826519, -0.4636709124591881, -0.12185444125912126, 0.25769136313862995, -0.2260010225369099, 0.36568344107316386, -0.2835553120072478, 0.4141194809047899, -0.2906732596138044, -0.2745943708041504, 0.13295626888761392, 0.044224177456627656, 0.11280341107735625, -0.2847848472001461, 0.010810164898679697, 0.4430960874098264, 0.44510689658155944, -0.3250162293093748, -0.42569561393228295, 0.176934147424762, -0.22041304525187988, -0.3708258728062167, 0.37421720803204284, 0.37336304570842727, -0.3375070080564796, -0.48805917215433836, -0.09341884036162584, 0.271520037834762, 0.0663046089251158, -0.23344372098150723, 0.3566617434021181, -0.20608507044252944, 0.22567425302748556, 0.08747933362309834, 0.16248224548311374, 0.3898539794927276, 0.28049768847279744, -0.39778778046455665, -0.28496333158069864, 0.4184036044235936, 0.22966930082478165, -0.3843896763389939, -0.47566098556897607, 0.23942794683703128, 0.372490203798722, -0.35975500535936356, -0.0007846511812865664, -0.4508984819338695, -0.14715580489970503, -0.47399888180047367, 0.023365155585409303, -0.044457849151365414, -0.16029491929067508, 0.3626493843019245, -0.0628185896484118, 0.2746881229165653, -0.061919407158804174, 0.37920498072695363, 0.1573046839111295, -0.2735701013635866, -0.39887565100894284, 0.13030121275149986, -0.09360742933232558, -0.019383504431448983, 0.339647488167769, 0.19122124281050434, 0.26386447808472435, 0.0995379439291455, -0.32392013264171615, 0.3682014091620076, 0.3758137802054268, 0.1560115260653514, 0.24476963785519756, 0.3780061420458657, 0.3763129097471267, -0.4070774371511311, -0.4006047099446409, -0.38837883268386875, -0.07715962729754255, -0.3534383805440712, 0.46280698192032244, 0.1856968028571354, -0.42508648014039985, 0.03224546604232581], :type=>\"scatter\", :mode=>\"markers+lines\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[-5.846856174320979, -3.234478143579401, -5.552227408357112, -4.979695035119516, -4.913974844590642, -5.187485075314687, -3.9555441073206192, -4.406746479672281, -6.119219620464968, -5.955675271510724, -4.539960552394012, -4.704256903388545, -3.9931310439507484, -6.68728173581632, -4.394516320923964, -4.616968672905619, -4.857744356438591, -5.247628340560906, -6.622419461146887, -6.960807487645317, -3.4853139639262025, -5.99723954157834, -6.53606062416722, -6.649049258973229, -5.764517914834626, -5.737207238295772, -3.010787204860319, -3.451395531452444, -3.7066559735596507, -3.1186909365773436, -3.1396231157993273, -5.3782829265003755, -3.935284837645618, -6.024865970142729, -6.724467891163727, -5.513475907392143, -4.85260194977997, -6.755424526916375, -6.019254506835878, -4.40994977774559, -3.9427346632532188, -6.168059928754172, -5.574523515758051, -4.571429320998886, -4.680454973728613, -5.476346771862001, -3.0076998061733913, -4.863237353200526, -5.688976433812603, -5.378254174926265, -3.050144184300954, -5.978780037734728, -3.5169858706129795, -5.718728117704011, -6.588916624659957, -3.5718842365746126, -5.713056212462586, -4.27029242488004, -6.90087885672887, -4.3818801837537915, -5.206812257850277, -5.350507050601187, -3.4570891424019123, -4.851113044943986, -4.992154310102163, -5.893432025446119, -4.77229051345145, -3.250079300462318, -3.0187638673197683, -5.515251987783209, -6.452251877650439, -3.0042288550849627, -3.403773514543825, -3.4667446598240867, -3.1738135113794614, -5.860381672695365, -5.0264855666595265, -5.291998846198721, -4.649238579559311, -4.256162483726853, -4.226965594562555, -4.487567600631907, -6.897746289702152, -4.892679999967271, -6.818509118675378, -3.4515901611321045, -3.7614637500641264, -4.211937423217915, -5.6307705672489075, -4.222007689926757, -3.8585261353483107, -3.260327792449652, -3.4967053121657443, -3.784953215998026, -5.245191884132513, -6.117494203591765, -3.338260214521552, -4.249588426402086, -5.51326793977587, -4.765168061337585, -5.3214737024153855], :type=>\"scatter\", :mode=>\"lines\", :name=>nil}], @layout={:xaxis=>{:title=>nil}, :yaxis=>{:title=>nil}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
141
+ ]
142
+ },
143
+ "metadata": {},
144
+ "output_type": "display_data"
145
+ }
146
+ ],
147
+ "source": [
148
+ "new_trace = { x: x, y: (0..n).map { rand(-2.0..2.0) - 5 }, type: 'scatter', mode: 'lines' }\n",
149
+ "plot.add_data(new_trace)\n",
150
+ "plot.show"
151
+ ]
152
+ },
153
+ {
154
+ "cell_type": "code",
155
+ "execution_count": 4,
156
+ "metadata": {
157
+ "collapsed": false,
158
+ "scrolled": true
159
+ },
160
+ "outputs": [
161
+ {
162
+ "data": {
163
+ "text/html": [
164
+ "\n",
165
+ " <script>\n",
166
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
167
+ " </script>\n",
168
+ "\n",
169
+ "\n",
170
+ "<div id=\"062aa7a1-a55a-4c9f-bf05-041e63a0c5c5\" style=\"height: 100%; width: 100%;\"></div>\n",
171
+ "\n",
172
+ "<script>\n",
173
+ " require(['plotly'], function(Plotly) { \n",
174
+ "Plotly.newPlot(\n",
175
+ " '062aa7a1-a55a-4c9f-bf05-041e63a0c5c5',\n",
176
+ " [{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[6.06809285761007,4.636906940962931,4.330238700807152,6.85050915666477,5.637207641802593,3.0076509876375916,5.417454930894399,5.443022499433825,3.715316760902408,6.298674809155711,4.718312623658639,6.557116204337994,5.469046768754387,3.3049464361471617,6.829346551172675,6.731500252491528,4.013521570529813,4.390503115116513,3.281004078174436,3.157165622484809,5.5608357321768445,6.453711025735326,4.638198597470634,6.7230530169591205,4.883533276073177,6.048195101973394,3.603643650024981,4.978721058770721,5.5344086262496734,4.048160751938436,6.836825542568651,5.368305070686512,4.938040527237902,5.19760847050968,4.642821434293228,5.176004689301651,5.440899388049205,6.564135894882811,6.667977718474269,3.1457827461494037,4.367390807654569,3.113026263177005,4.557801032096629,3.0548050244087084,4.555071033697201,6.477634588624724,4.383769287513611,4.4867713393020985,4.5366323781849545,5.790113140231682,3.569408452958307,5.024582366959441,4.716869920830076,5.303160673283337,6.259770964723529,3.5676433050694474,3.4686674839576703,4.195307375357299,5.1704024042712025,4.0132893828576695,4.927397951548005,3.4914506084576087,6.724434760757954,5.034318208474589,6.997859951137011,4.950615251862406,5.026669478709405,6.467537845224117,6.34093065366986,4.128664041905479,4.044395313327865,6.852280309768207,3.8676352287365163,3.6953535418490078,3.1410597684975263,6.280960018648205,4.4218603241692085,6.427396422756709,4.457080339196608,6.288199388971066,3.136795000680894,4.737643745031619,5.003841502314865,5.353742367063637,5.225903938911866,5.524262200476983,6.936354879361975,3.8522611646409093,3.33426886156358,6.14171347176754,4.549846351320822,5.395150805727262,4.288594239916755,3.5435448270376217,4.461613936682362,3.2954332079609587,5.774661534071372,4.699295399407788,4.136828275172596,3.002066290677958,5.774275028520613],\"type\":\"scatter\",\"mode\":\"markers\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[0.4999749917031834,-0.4445463462560286,0.031638412284818784,-0.49576531125495504,-0.3277243828008579,0.06670705046336822,0.1752857306002663,0.34193950767171666,0.39023097455246314,-0.19115917761871015,0.21347259965535093,0.2766775489316884,0.11711757480736318,-0.3221176774416923,0.3998375121886233,-0.3326877663333745,-0.3243725224569931,0.4402976908826519,-0.4636709124591881,-0.12185444125912126,0.25769136313862995,-0.2260010225369099,0.36568344107316386,-0.2835553120072478,0.4141194809047899,-0.2906732596138044,-0.2745943708041504,0.13295626888761392,0.044224177456627656,0.11280341107735625,-0.2847848472001461,0.010810164898679697,0.4430960874098264,0.44510689658155944,-0.3250162293093748,-0.42569561393228295,0.176934147424762,-0.22041304525187988,-0.3708258728062167,0.37421720803204284,0.37336304570842727,-0.3375070080564796,-0.48805917215433836,-0.09341884036162584,0.271520037834762,0.0663046089251158,-0.23344372098150723,0.3566617434021181,-0.20608507044252944,0.22567425302748556,0.08747933362309834,0.16248224548311374,0.3898539794927276,0.28049768847279744,-0.39778778046455665,-0.28496333158069864,0.4184036044235936,0.22966930082478165,-0.3843896763389939,-0.47566098556897607,0.23942794683703128,0.372490203798722,-0.35975500535936356,-0.0007846511812865664,-0.4508984819338695,-0.14715580489970503,-0.47399888180047367,0.023365155585409303,-0.044457849151365414,-0.16029491929067508,0.3626493843019245,-0.0628185896484118,0.2746881229165653,-0.061919407158804174,0.37920498072695363,0.1573046839111295,-0.2735701013635866,-0.39887565100894284,0.13030121275149986,-0.09360742933232558,-0.019383504431448983,0.339647488167769,0.19122124281050434,0.26386447808472435,0.0995379439291455,-0.32392013264171615,0.3682014091620076,0.3758137802054268,0.1560115260653514,0.24476963785519756,0.3780061420458657,0.3763129097471267,-0.4070774371511311,-0.4006047099446409,-0.38837883268386875,-0.07715962729754255,-0.3534383805440712,0.46280698192032244,0.1856968028571354,-0.42508648014039985,0.03224546604232581],\"type\":\"scatter\",\"mode\":\"markers+lines\",\"name\":null},{\"x\":[0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.24,0.25,0.26,0.27,0.28,0.29,0.3,0.31,0.32,0.33,0.34,0.35,0.36,0.37,0.38,0.39,0.4,0.41,0.42,0.43,0.44,0.45,0.46,0.47,0.48,0.49,0.5,0.51,0.52,0.53,0.54,0.55,0.56,0.57,0.58,0.59,0.6,0.61,0.62,0.63,0.64,0.65,0.66,0.67,0.68,0.69,0.7,0.71,0.72,0.73,0.74,0.75,0.76,0.77,0.78,0.79,0.8,0.81,0.82,0.83,0.84,0.85,0.86,0.87,0.88,0.89,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,1.0],\"y\":[-5.846856174320979,-3.234478143579401,-5.552227408357112,-4.979695035119516,-4.913974844590642,-5.187485075314687,-3.9555441073206192,-4.406746479672281,-6.119219620464968,-5.955675271510724,-4.539960552394012,-4.704256903388545,-3.9931310439507484,-6.68728173581632,-4.394516320923964,-4.616968672905619,-4.857744356438591,-5.247628340560906,-6.622419461146887,-6.960807487645317,-3.4853139639262025,-5.99723954157834,-6.53606062416722,-6.649049258973229,-5.764517914834626,-5.737207238295772,-3.010787204860319,-3.451395531452444,-3.7066559735596507,-3.1186909365773436,-3.1396231157993273,-5.3782829265003755,-3.935284837645618,-6.024865970142729,-6.724467891163727,-5.513475907392143,-4.85260194977997,-6.755424526916375,-6.019254506835878,-4.40994977774559,-3.9427346632532188,-6.168059928754172,-5.574523515758051,-4.571429320998886,-4.680454973728613,-5.476346771862001,-3.0076998061733913,-4.863237353200526,-5.688976433812603,-5.378254174926265,-3.050144184300954,-5.978780037734728,-3.5169858706129795,-5.718728117704011,-6.588916624659957,-3.5718842365746126,-5.713056212462586,-4.27029242488004,-6.90087885672887,-4.3818801837537915,-5.206812257850277,-5.350507050601187,-3.4570891424019123,-4.851113044943986,-4.992154310102163,-5.893432025446119,-4.77229051345145,-3.250079300462318,-3.0187638673197683,-5.515251987783209,-6.452251877650439,-3.0042288550849627,-3.403773514543825,-3.4667446598240867,-3.1738135113794614,-5.860381672695365,-5.0264855666595265,-5.291998846198721,-4.649238579559311,-4.256162483726853,-4.226965594562555,-4.487567600631907,-6.897746289702152,-4.892679999967271,-6.818509118675378,-3.4515901611321045,-3.7614637500641264,-4.211937423217915,-5.6307705672489075,-4.222007689926757,-3.8585261353483107,-3.260327792449652,-3.4967053121657443,-3.784953215998026,-5.245191884132513,-6.117494203591765,-3.338260214521552,-4.249588426402086,-5.51326793977587,-4.765168061337585,-5.3214737024153855],\"type\":\"scatter\",\"mode\":\"lines\",\"name\":null}],\n",
177
+ " {\"xaxis\":{\"title\":\"x title\"},\"yaxis\":{\"title\":\"y title\"},\"barmode\":null},\n",
178
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
179
+ ")\n",
180
+ "\n",
181
+ "window.addEventListener('resize', function() {\n",
182
+ " Plotly.Plots.resize(document.getElementById('062aa7a1-a55a-4c9f-bf05-041e63a0c5c5'))\n",
183
+ "})\n",
184
+ " }) \n",
185
+ "</script>"
186
+ ],
187
+ "text/plain": [
188
+ "#<Plotly::Offline::HTML:0x007ff3918b5d30 @id=\"062aa7a1-a55a-4c9f-bf05-041e63a0c5c5\", @data=[{:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[6.06809285761007, 4.636906940962931, 4.330238700807152, 6.85050915666477, 5.637207641802593, 3.0076509876375916, 5.417454930894399, 5.443022499433825, 3.715316760902408, 6.298674809155711, 4.718312623658639, 6.557116204337994, 5.469046768754387, 3.3049464361471617, 6.829346551172675, 6.731500252491528, 4.013521570529813, 4.390503115116513, 3.281004078174436, 3.157165622484809, 5.5608357321768445, 6.453711025735326, 4.638198597470634, 6.7230530169591205, 4.883533276073177, 6.048195101973394, 3.603643650024981, 4.978721058770721, 5.5344086262496734, 4.048160751938436, 6.836825542568651, 5.368305070686512, 4.938040527237902, 5.19760847050968, 4.642821434293228, 5.176004689301651, 5.440899388049205, 6.564135894882811, 6.667977718474269, 3.1457827461494037, 4.367390807654569, 3.113026263177005, 4.557801032096629, 3.0548050244087084, 4.555071033697201, 6.477634588624724, 4.383769287513611, 4.4867713393020985, 4.5366323781849545, 5.790113140231682, 3.569408452958307, 5.024582366959441, 4.716869920830076, 5.303160673283337, 6.259770964723529, 3.5676433050694474, 3.4686674839576703, 4.195307375357299, 5.1704024042712025, 4.0132893828576695, 4.927397951548005, 3.4914506084576087, 6.724434760757954, 5.034318208474589, 6.997859951137011, 4.950615251862406, 5.026669478709405, 6.467537845224117, 6.34093065366986, 4.128664041905479, 4.044395313327865, 6.852280309768207, 3.8676352287365163, 3.6953535418490078, 3.1410597684975263, 6.280960018648205, 4.4218603241692085, 6.427396422756709, 4.457080339196608, 6.288199388971066, 3.136795000680894, 4.737643745031619, 5.003841502314865, 5.353742367063637, 5.225903938911866, 5.524262200476983, 6.936354879361975, 3.8522611646409093, 3.33426886156358, 6.14171347176754, 4.549846351320822, 5.395150805727262, 4.288594239916755, 3.5435448270376217, 4.461613936682362, 3.2954332079609587, 5.774661534071372, 4.699295399407788, 4.136828275172596, 3.002066290677958, 5.774275028520613], :type=>\"scatter\", :mode=>\"markers\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[0.4999749917031834, -0.4445463462560286, 0.031638412284818784, -0.49576531125495504, -0.3277243828008579, 0.06670705046336822, 0.1752857306002663, 0.34193950767171666, 0.39023097455246314, -0.19115917761871015, 0.21347259965535093, 0.2766775489316884, 0.11711757480736318, -0.3221176774416923, 0.3998375121886233, -0.3326877663333745, -0.3243725224569931, 0.4402976908826519, -0.4636709124591881, -0.12185444125912126, 0.25769136313862995, -0.2260010225369099, 0.36568344107316386, -0.2835553120072478, 0.4141194809047899, -0.2906732596138044, -0.2745943708041504, 0.13295626888761392, 0.044224177456627656, 0.11280341107735625, -0.2847848472001461, 0.010810164898679697, 0.4430960874098264, 0.44510689658155944, -0.3250162293093748, -0.42569561393228295, 0.176934147424762, -0.22041304525187988, -0.3708258728062167, 0.37421720803204284, 0.37336304570842727, -0.3375070080564796, -0.48805917215433836, -0.09341884036162584, 0.271520037834762, 0.0663046089251158, -0.23344372098150723, 0.3566617434021181, -0.20608507044252944, 0.22567425302748556, 0.08747933362309834, 0.16248224548311374, 0.3898539794927276, 0.28049768847279744, -0.39778778046455665, -0.28496333158069864, 0.4184036044235936, 0.22966930082478165, -0.3843896763389939, -0.47566098556897607, 0.23942794683703128, 0.372490203798722, -0.35975500535936356, -0.0007846511812865664, -0.4508984819338695, -0.14715580489970503, -0.47399888180047367, 0.023365155585409303, -0.044457849151365414, -0.16029491929067508, 0.3626493843019245, -0.0628185896484118, 0.2746881229165653, -0.061919407158804174, 0.37920498072695363, 0.1573046839111295, -0.2735701013635866, -0.39887565100894284, 0.13030121275149986, -0.09360742933232558, -0.019383504431448983, 0.339647488167769, 0.19122124281050434, 0.26386447808472435, 0.0995379439291455, -0.32392013264171615, 0.3682014091620076, 0.3758137802054268, 0.1560115260653514, 0.24476963785519756, 0.3780061420458657, 0.3763129097471267, -0.4070774371511311, -0.4006047099446409, -0.38837883268386875, -0.07715962729754255, -0.3534383805440712, 0.46280698192032244, 0.1856968028571354, -0.42508648014039985, 0.03224546604232581], :type=>\"scatter\", :mode=>\"markers+lines\", :name=>nil}, {:x=>[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0], :y=>[-5.846856174320979, -3.234478143579401, -5.552227408357112, -4.979695035119516, -4.913974844590642, -5.187485075314687, -3.9555441073206192, -4.406746479672281, -6.119219620464968, -5.955675271510724, -4.539960552394012, -4.704256903388545, -3.9931310439507484, -6.68728173581632, -4.394516320923964, -4.616968672905619, -4.857744356438591, -5.247628340560906, -6.622419461146887, -6.960807487645317, -3.4853139639262025, -5.99723954157834, -6.53606062416722, -6.649049258973229, -5.764517914834626, -5.737207238295772, -3.010787204860319, -3.451395531452444, -3.7066559735596507, -3.1186909365773436, -3.1396231157993273, -5.3782829265003755, -3.935284837645618, -6.024865970142729, -6.724467891163727, -5.513475907392143, -4.85260194977997, -6.755424526916375, -6.019254506835878, -4.40994977774559, -3.9427346632532188, -6.168059928754172, -5.574523515758051, -4.571429320998886, -4.680454973728613, -5.476346771862001, -3.0076998061733913, -4.863237353200526, -5.688976433812603, -5.378254174926265, -3.050144184300954, -5.978780037734728, -3.5169858706129795, -5.718728117704011, -6.588916624659957, -3.5718842365746126, -5.713056212462586, -4.27029242488004, -6.90087885672887, -4.3818801837537915, -5.206812257850277, -5.350507050601187, -3.4570891424019123, -4.851113044943986, -4.992154310102163, -5.893432025446119, -4.77229051345145, -3.250079300462318, -3.0187638673197683, -5.515251987783209, -6.452251877650439, -3.0042288550849627, -3.403773514543825, -3.4667446598240867, -3.1738135113794614, -5.860381672695365, -5.0264855666595265, -5.291998846198721, -4.649238579559311, -4.256162483726853, -4.226965594562555, -4.487567600631907, -6.897746289702152, -4.892679999967271, -6.818509118675378, -3.4515901611321045, -3.7614637500641264, -4.211937423217915, -5.6307705672489075, -4.222007689926757, -3.8585261353483107, -3.260327792449652, -3.4967053121657443, -3.784953215998026, -5.245191884132513, -6.117494203591765, -3.338260214521552, -4.249588426402086, -5.51326793977587, -4.765168061337585, -5.3214737024153855], :type=>\"scatter\", :mode=>\"lines\", :name=>nil}], @layout={:xaxis=>{:title=>\"x title\"}, :yaxis=>{:title=>\"y title\"}, :barmode=>nil}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
189
+ ]
190
+ },
191
+ "metadata": {},
192
+ "output_type": "display_data"
193
+ }
194
+ ],
195
+ "source": [
196
+ "plot.y_title = 'y title'\n",
197
+ "plot.x_title = 'x title'\n",
198
+ "\n",
199
+ "plot.show"
200
+ ]
201
+ },
202
+ {
203
+ "cell_type": "code",
204
+ "execution_count": null,
205
+ "metadata": {
206
+ "collapsed": true
207
+ },
208
+ "outputs": [],
209
+ "source": []
210
+ }
211
+ ],
212
+ "metadata": {
213
+ "kernelspec": {
214
+ "display_name": "Ruby 2.3.1",
215
+ "language": "ruby",
216
+ "name": "ruby"
217
+ },
218
+ "language_info": {
219
+ "file_extension": ".rb",
220
+ "mimetype": "application/x-ruby",
221
+ "name": "ruby",
222
+ "version": "2.3.1"
223
+ }
224
+ },
225
+ "nbformat": 4,
226
+ "nbformat_minor": 1
227
+ }