rbplotly 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/README.md +30 -14
- data/Rakefile +3 -0
- data/docs/images/line_chart.png +0 -0
- data/examples/basic_bar_chart.ipynb +6 -6
- data/examples/basic_histogram.ipynb +78 -0
- data/examples/basic_pie_chart.ipynb +84 -0
- data/examples/grouped_bar_chart.ipynb +5 -5
- data/examples/heatmaps.ipynb +89 -0
- data/examples/line_and_scatter_plots.ipynb +227 -0
- data/examples/stacked_bar_chart.ipynb +6 -6
- data/lib/plotly/data.rb +3 -1
- data/lib/plotly/layout.rb +1 -1
- data/lib/plotly/version.rb +1 -1
- metadata +7 -4
- data/docs/images/scatter_and_line.png +0 -0
- data/examples/line_and_scatter.ipynb +0 -227
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12a283cb8d5c796e2b12061535d8596bda9d6e3a
|
4
|
+
data.tar.gz: 7e1caa12dfc7aea0d32d9e248bf529b160c2801d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c4e57a7cec8e5c2560b185c34acbdd6a8b20dca2ed5c20aeda625b2ce0b6bff68b37d12036ce1b107570a1567236d5342d34401adccd118e80f4b08ecc9d55
|
7
|
+
data.tar.gz: 5319bb3c474eec40ad59fc195bdb11d478a8e9772e3450ab91f813658ac58d1530c6667e1e5d004de4e583316c3ffab46d135fe0946b2de2ce2d6dfe3f18481e
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/rbplotly.svg)](https://badge.fury.io/rb/rbplotly)
|
2
|
+
[![Dependency Status](https://gemnasium.com/badges/github.com/y4ashida/rbplotly.svg)](https://gemnasium.com/github.com/y4ashida/rbplotly)
|
3
|
+
[![Build Status](https://travis-ci.org/y4ashida/rbplotly.svg?branch=master)](https://travis-ci.org/y4ashida/rbplotly)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/y4ashida/rbplotly/badges/gpa.svg)](https://codeclimate.com/github/y4ashida/rbplotly)
|
5
|
+
|
1
6
|
# Rbplotly
|
2
7
|
|
3
8
|
[Plot.ly](https://plot.ly/) API client and Interface to [plotly.js](https://plot.ly/javascript/).
|
@@ -20,30 +25,41 @@ Or install it yourself as:
|
|
20
25
|
|
21
26
|
## Usage
|
22
27
|
|
23
|
-
### Plotly Offline
|
24
|
-
|
25
28
|
```ruby
|
26
29
|
require 'rbplotly'
|
27
30
|
|
28
|
-
|
31
|
+
x = [0, 1, 2, 3, 4]
|
32
|
+
trace0 = { x: x, y: [0, 2, 1, 4, 3], type: :scatter, mode: :lines }
|
33
|
+
trace1 = { x: x, y: [4, 1, 3, 0, 2], type: :scatter, mode: 'markers+lines' }
|
34
|
+
data = [trace0, trace1] # data must be Array
|
35
|
+
|
36
|
+
layout = { width: 500, height: 500 }
|
29
37
|
|
30
|
-
|
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 }
|
38
|
+
plot = Plotly::Plot.new(data: data, layout: layout)
|
34
39
|
|
35
|
-
|
36
|
-
trace1 = trace0.merge(y: y1, mode: 'markers+lines')
|
37
|
-
trace2 = trace0.merge(y: y2, mode: 'lines')
|
40
|
+
plot.layout.height = 300 # You can change plot's attributes.
|
38
41
|
|
39
|
-
|
42
|
+
plot.generate_html(path: './line_chart.html')
|
43
|
+
```
|
44
|
+
|
45
|
+
![](./docs/images/line_chart.png)
|
40
46
|
|
41
|
-
|
47
|
+
Use `#download_image` if you want to get an image by using Plot.ly API. You can get your API KEY [here](https://plot.ly/settings/api).
|
42
48
|
|
43
|
-
|
49
|
+
```ruby
|
50
|
+
Plotly.auth(<YOUR_USERNAME>, <YOUR_API_KEY>)
|
51
|
+
plot.download_image(path: './line_chart.png')
|
44
52
|
```
|
45
53
|
|
46
|
-
|
54
|
+
Or use `#show` on IRuby notebooks.
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
plot.show
|
58
|
+
```
|
59
|
+
|
60
|
+
## Examples
|
61
|
+
|
62
|
+
Visit [nbviewer.jupyter.org/github/y4ashida/rbplotly](https://nbviewer.jupyter.org/github/y4ashida/rbplotly/tree/master/examples/) to see more examples.
|
47
63
|
|
48
64
|
## Contributing
|
49
65
|
|
data/Rakefile
CHANGED
Binary file
|
@@ -16,25 +16,25 @@
|
|
16
16
|
" </script>\n",
|
17
17
|
"\n",
|
18
18
|
"\n",
|
19
|
-
"<div id=\"
|
19
|
+
"<div id=\"b337b102-53ef-4d65-bc09-da1e140a6d72\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
20
|
"\n",
|
21
21
|
"<script>\n",
|
22
22
|
" require(['plotly'], function(Plotly) { \n",
|
23
23
|
"Plotly.newPlot(\n",
|
24
|
-
" '
|
25
|
-
" [{\"x\":[\"giraffes\",\"orangutans\",\"monkeys\"],\"y\":[20,14,23],\"type\":\"bar\"
|
26
|
-
" {
|
24
|
+
" 'b337b102-53ef-4d65-bc09-da1e140a6d72',\n",
|
25
|
+
" [{\"x\":[\"giraffes\",\"orangutans\",\"monkeys\"],\"y\":[20,14,23],\"type\":\"bar\"}],\n",
|
26
|
+
" {},\n",
|
27
27
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
28
28
|
")\n",
|
29
29
|
"\n",
|
30
30
|
"window.addEventListener('resize', function() {\n",
|
31
|
-
" Plotly.Plots.resize(document.getElementById('
|
31
|
+
" Plotly.Plots.resize(document.getElementById('b337b102-53ef-4d65-bc09-da1e140a6d72'))\n",
|
32
32
|
"})\n",
|
33
33
|
" }) \n",
|
34
34
|
"</script>"
|
35
35
|
],
|
36
36
|
"text/plain": [
|
37
|
-
"#<Plotly::Offline::HTML:
|
37
|
+
"#<Plotly::Offline::HTML:0x007f9b6308a5d8 @id=\"b337b102-53ef-4d65-bc09-da1e140a6d72\", @data=[{:x=>[\"giraffes\", \"orangutans\", \"monkeys\"], :y=>[20, 14, 23], :type=>\"bar\"}], @layout={}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
38
38
|
]
|
39
39
|
},
|
40
40
|
"metadata": {},
|
@@ -0,0 +1,78 @@
|
|
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=\"8cd9d949-4ada-4cd8-8338-e2e2ee2b9894\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
|
+
"\n",
|
21
|
+
"<script>\n",
|
22
|
+
" require(['plotly'], function(Plotly) { \n",
|
23
|
+
"Plotly.newPlot(\n",
|
24
|
+
" '8cd9d949-4ada-4cd8-8338-e2e2ee2b9894',\n",
|
25
|
+
" [{\"x\":[0.2942709079419361,0.21075759664424176,0.4507635598118156,0.5323161996836732,0.6158483935534982,0.5617685506761113,0.35638093468678644,0.3074352092618795,0.5258449178776419,0.23494017880585927,0.4214906201632882,0.7193667701902945,0.6053315167489312,0.09477150002187884,0.4314088198988131,0.27960276312421906,0.41168595404290975,0.5953329609033754,0.6488141113825862,0.6410450088742157,0.132768417851155,0.8113876306653193,0.5273586577978917,0.28958212346490253,0.38473122133283955,0.7553623738760905,0.916057071154953,0.9771422921019263,0.0219087343931772,0.959356940593063,0.31496436239305514,0.4929757656826076,0.09275750315650222,0.1901546379163196,0.2863331668936532,0.7814963736183473,0.7119537514573202,0.4452566739637793,0.6364985523353799,0.985505960553461,0.5929799524726765,0.9012967309444065,0.1271205742249878,0.9780643213354355,0.08594175798500059,0.27123583096405957,0.17231648924344356,0.24895388314055777,0.5100325456406406,0.5412226190780236,0.5111980390074985,0.3232401419316209,0.13531428633657716,0.2591334248438265,0.4821708390962126,0.8014878786815782,0.2899575578756306,0.8108883195252004,0.722215430315489,0.009056222905411526,0.48552884977728294,0.33340540359009707,0.8003361642594651,0.8427350029092714,0.37339540802571425,0.541811915189543,0.16120694531201574,0.7720641422417982,0.37137056481474384,0.509624045994267,0.8614811955627087,0.9008755367629196,0.7031515805109934,0.8758201763909,0.029758008062963248,0.9158105445145365,0.5373366017132732,0.3313928741057912,0.2842638793890436,0.9030223662989227,0.16091834803230776,0.7439085852420073,0.6475130418149018,0.277222372740378,0.20605308088701468,0.7076028785986701,0.24821375004977386,0.35076605164148944,0.21775481711911826,0.48863703774176226,0.3240564827407624,0.6569852411086875,0.8646104433302572,0.032628637093236934,0.4183281558685189,0.49152520508373,0.9854387029968675,0.5217709480239929,0.2952470004242418,0.3747243839808386,0.0022222160679797875,0.6079710738932325,0.408837222195892,0.7137510115245531,0.026631069825837184,0.8535186292939572,0.2878963833317988,0.6673978080298499,0.3797394719250412,0.43905894290341696,0.9221967919292648,0.24201261819525344,0.9113120240616012,0.15844090140797495,0.2296107202886991,0.32951316125944863,0.3832833309853714,0.8825125009427446,0.023803239891589056,0.3815298434084522,0.4396209521854534,0.01677209901187504,0.7129563665098051,0.8935827919706518,0.8836885104189789,0.5586933037337863,0.4631678740951215,0.2511454740364518,0.9126451540069624,0.5748456932188779,0.18541335074790866,0.6068470030767213,0.4623586525738892,0.31081955843779097,0.16518377979946153,0.9819362270306423,0.6645902067860189,0.6292367200209642,0.11814669866048932,0.6327028775036166,0.07682728452371301,0.5442762713814352,0.9129196111200293,0.6737269515014628,0.03603614772157482,0.5053681219718107,0.29370477336711054,0.18177236613304792,0.2554415598717049,0.2524982631580386,0.5726274776391082,0.20500109424473656,0.8049705018094359,0.35001086160422756,0.6963830934214947,0.9465031779055827,0.8129040125680941,0.5048075563682233,0.8608021523080329,0.6284187168241879,0.9349856967094302,0.9930549237820306,0.26343920418020805,0.6943739359274025,0.09823233938873932,0.7534403691965718,0.7398552475673881,0.1555710404799937,0.1484835805875444,0.38080622222386384,0.6713646870213317,0.5472395092483366,0.08423003327212197,0.6466004957425141,0.27150872574666385,0.4829323271794369,0.31210043906079965,0.3249582842593215,0.290427691449503,0.41155481592833965,0.8106662674354532,0.18587851551930668,0.4528656860956295,0.17114660326352116,0.4657061167867842,0.2678784371054048,0.9860822027956542,0.28047740160016876,0.521866274344278,0.23089755291895653,0.26204333667852997,0.5264128482799174,0.03426637729358151,0.7178404125569819,0.49075453093501586,0.3174519971304802,0.580396295921689,0.8266488621026452,0.7145309095096285,0.3501015280428994,0.6774635074773913,0.6768061638196861,0.6997583253682814,0.8066203028740551,0.8060843323954033,0.35281671584294216,0.8166777460186373,0.9176081177172289,0.5015194037604084,0.5497997542734646,0.3612105080818233,0.5588510130880481,0.6323976574824047,0.710426913983777,0.4295719280790321,0.9106276638850702,0.2969059720125792,0.8432199875528353,0.7024317420417275,0.009213481391956768,0.14840918515582413,0.4529302232160588,0.6848250846776632,0.45421324797411733,0.8959347890115728,0.16397372493321005,0.31330878241100824,0.8970678010214731,0.5632453945468702,0.5126777731995182,0.8704174071253197,0.23665247116338428,0.6782310850048989,0.3099431671901419,0.5454608867909275,0.09230030613085294,0.9458744493467494,0.41611195633659104,0.6397763480667221,0.8384489016228241,0.09874205494309396,0.5278468931744442,0.5438495268719838,0.55149494135528,0.14448053384817994,0.044544066932281634,0.6612783513242274,0.3755649576347456,0.03431220454769368,0.9934612492190255,0.7688710280082478,0.3389545252253131,0.7738187030110214,0.8164872467484098,0.6537895037213985,0.39219860407683615,0.7730181491466183,0.42700223475264354,0.8372670915582412,0.5603023624971715,0.3484920851550566,0.12206268085300387,0.027718472955160833,0.24285845047466093,0.13038457134274584,0.1821421457270478,0.8180641842961788,0.6468112289433454,0.6786137832515612,0.2649645187318215,0.11295847190839181,0.7144763224313668,0.8422882803137242,0.5918360397074763,0.02755719654452693,0.13116827489513205,0.49030978251776536,0.3916416343823188,0.542612607444934,0.5733307179767209,0.8826236345600653,0.9647812905494776,0.4682062972046238,0.4705116301141766,0.769346350896276,0.3018252236745911,0.37357948414324493,0.1990652770918181,0.4515414233628311,0.5714040818663472,0.35356923959515096,0.08040731267102208,0.7077296226845344,0.7613501056061757,0.6877755636276306,0.23423531668691677,0.15732190970119075,0.01572296878651469,0.4972830491804182,0.06953300231224568,0.9486183952571313,0.8258159412557152,0.8759965850303153,0.5050362417378709,0.920482499464285,0.21951268335215468,0.17591719288392538,0.183929251947756,0.3458198381752471,0.4377243202530733,0.47258056893381273,0.6036247398522206,0.6119589322617547,0.9254168838168809,0.5499518801287434,0.06549122080508862,0.002345009937452236,0.7842790516149253,0.30803301120008,0.5138356182043174,0.26838201047138055,0.5707338026291777,0.3674770876623539,0.5538191156986997,0.553089683547777,0.9236581903299089,0.2450054076762701,0.09995188815404654,0.333918910608927,0.33810683615739734,0.4197761045872076,0.10930582365824137,0.19268651403745518,0.28104316479552793,0.13985976786349663,0.08600886760067239,0.0656213654021297,0.20133628379098356,0.9660525097779862,0.6639676809486362,0.3732173968706438,0.938124691115413,0.24087242309990708,0.2853633435948504,0.7724020152231509,0.9311919103670926,0.4129195996238262,0.549424018927679,0.5713708322304388,0.8304312892057317,0.9116587388110712,0.34586556512679856,0.007457731400561829,0.11653803285232622,0.8153213795722827,0.3471412438377265,0.8668860464942315,0.5117052713795001,0.27426734321788726,0.5976215223321437,0.7804553294199835,0.9489054134629865,0.36976800776426366,0.19709441088456436,0.8248778946505538,0.12748719393789132,0.24491881813804894,0.7583909969173175,0.8492236890472936,0.3160062336108673,0.44218634017679515,0.18907910462480781,0.47734786697519616,0.09463987861103729,0.5528685935787785,0.6610112704878279,0.8865471529389028,0.8246710260577944,0.3880737642012275,0.5811050568529739,0.14880638056045825,0.9276415004469738,0.6177569381931396,0.9721131522430645,0.7353838396758146,0.7752058260586295,0.12365050791065424,0.32465313662264517,0.8110383623085385,0.9255192921471196,0.19706632127489765,0.37020583290596387,0.725594740942325,0.020413393964460846,0.8881857750967495,0.9485199875905115,0.36846960644985616,0.7918999917529174,0.423193551068502,0.27683789749658594,0.9973755764641876,0.4369426539414166,0.5210822181866065,0.6725181600315542,0.8844065079838399,0.7938671324456699,0.4885784289761004,0.9208925570401483,0.9551805020128525,0.7490598086744121,0.5314785233220692,0.08557551651769779,0.25999214439263596,0.3263877503823479,0.23009056001953465,0.7750140599329359,0.7603083360926515,0.4371122196226007,0.592546574999225,0.4821310674081929,0.32436500759864006,0.8742171703912331,0.04898062097810041,0.8003075158126195,0.17451423533153054,0.9328154827810852,0.1949657274732911,0.12738692278295904,0.6815430352071549,0.6749851716467928,0.21205388564298377,0.39022749174358295,0.22704393318795313,0.5886191069130098,0.47152988406519647,0.36682963953924175,0.2568868081590474,0.3308967136527572,0.1502751737108453,0.13227401066294486,0.8364865727894538,0.42464541751131546,0.12545576758618038,0.0023779038694338173,0.8940403774280427,0.3552112637033934,0.3095927645685266,0.014957456013550474,0.3092687689903968,0.7595996527232244,0.838860282628128,0.18611730064376508,0.5676321819679359,0.8381828655393255,0.4488607859017437,0.3781759289638611,0.29064535015201065,0.0794772225593936,0.9253770000571481,0.4183735871388634,0.910601529377618,0.42192477480835877,0.8233923972712007,0.9105486215288278,0.49401585809766446,0.08551880413472723,0.7993691011952908,0.6069348982414523,0.06703257963194686,0.012015456336609609,0.6921094126947531,0.03911318980788714,0.2462026742757164,0.23797051075933773,0.9077271191025862,0.4876356006796734,0.594503090962133,0.3698579698339496,0.5020034706650011,0.4397730753924677,0.3985572387604728,0.8169456759088498,0.7012262143279271,0.7253821399763081,0.36881581330929647,0.6131995421946187,0.9860127149188899,0.27979538121718317,0.8737188584162405,0.7965397248081789,0.14123154406220895,0.14034046592971972,0.8459868501320017,0.16345744209812085,0.7532579445397001,0.43320012365931726,0.7086148468853519,0.43637278596129714,0.47025541700797535,0.27460675585180294],\"type\":\"histogram\"}],\n",
|
26
|
+
" {},\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('8cd9d949-4ada-4cd8-8338-e2e2ee2b9894'))\n",
|
32
|
+
"})\n",
|
33
|
+
" }) \n",
|
34
|
+
"</script>"
|
35
|
+
],
|
36
|
+
"text/plain": [
|
37
|
+
"#<Plotly::Offline::HTML:0x007fd612af40e8 @id=\"8cd9d949-4ada-4cd8-8338-e2e2ee2b9894\", @data=[{:x=>[0.2942709079419361, 0.21075759664424176, 0.4507635598118156, 0.5323161996836732, 0.6158483935534982, 0.5617685506761113, 0.35638093468678644, 0.3074352092618795, 0.5258449178776419, 0.23494017880585927, 0.4214906201632882, 0.7193667701902945, 0.6053315167489312, 0.09477150002187884, 0.4314088198988131, 0.27960276312421906, 0.41168595404290975, 0.5953329609033754, 0.6488141113825862, 0.6410450088742157, 0.132768417851155, 0.8113876306653193, 0.5273586577978917, 0.28958212346490253, 0.38473122133283955, 0.7553623738760905, 0.916057071154953, 0.9771422921019263, 0.0219087343931772, 0.959356940593063, 0.31496436239305514, 0.4929757656826076, 0.09275750315650222, 0.1901546379163196, 0.2863331668936532, 0.7814963736183473, 0.7119537514573202, 0.4452566739637793, 0.6364985523353799, 0.985505960553461, 0.5929799524726765, 0.9012967309444065, 0.1271205742249878, 0.9780643213354355, 0.08594175798500059, 0.27123583096405957, 0.17231648924344356, 0.24895388314055777, 0.5100325456406406, 0.5412226190780236, 0.5111980390074985, 0.3232401419316209, 0.13531428633657716, 0.2591334248438265, 0.4821708390962126, 0.8014878786815782, 0.2899575578756306, 0.8108883195252004, 0.722215430315489, 0.009056222905411526, 0.48552884977728294, 0.33340540359009707, 0.8003361642594651, 0.8427350029092714, 0.37339540802571425, 0.541811915189543, 0.16120694531201574, 0.7720641422417982, 0.37137056481474384, 0.509624045994267, 0.8614811955627087, 0.9008755367629196, 0.7031515805109934, 0.8758201763909, 0.029758008062963248, 0.9158105445145365, 0.5373366017132732, 0.3313928741057912, 0.2842638793890436, 0.9030223662989227, 0.16091834803230776, 0.7439085852420073, 0.6475130418149018, 0.277222372740378, 0.20605308088701468, 0.7076028785986701, 0.24821375004977386, 0.35076605164148944, 0.21775481711911826, 0.48863703774176226, 0.3240564827407624, 0.6569852411086875, 0.8646104433302572, 0.032628637093236934, 0.4183281558685189, 0.49152520508373, 0.9854387029968675, 0.5217709480239929, 0.2952470004242418, 0.3747243839808386, 0.0022222160679797875, 0.6079710738932325, 0.408837222195892, 0.7137510115245531, 0.026631069825837184, 0.8535186292939572, 0.2878963833317988, 0.6673978080298499, 0.3797394719250412, 0.43905894290341696, 0.9221967919292648, 0.24201261819525344, 0.9113120240616012, 0.15844090140797495, 0.2296107202886991, 0.32951316125944863, 0.3832833309853714, 0.8825125009427446, 0.023803239891589056, 0.3815298434084522, 0.4396209521854534, 0.01677209901187504, 0.7129563665098051, 0.8935827919706518, 0.8836885104189789, 0.5586933037337863, 0.4631678740951215, 0.2511454740364518, 0.9126451540069624, 0.5748456932188779, 0.18541335074790866, 0.6068470030767213, 0.4623586525738892, 0.31081955843779097, 0.16518377979946153, 0.9819362270306423, 0.6645902067860189, 0.6292367200209642, 0.11814669866048932, 0.6327028775036166, 0.07682728452371301, 0.5442762713814352, 0.9129196111200293, 0.6737269515014628, 0.03603614772157482, 0.5053681219718107, 0.29370477336711054, 0.18177236613304792, 0.2554415598717049, 0.2524982631580386, 0.5726274776391082, 0.20500109424473656, 0.8049705018094359, 0.35001086160422756, 0.6963830934214947, 0.9465031779055827, 0.8129040125680941, 0.5048075563682233, 0.8608021523080329, 0.6284187168241879, 0.9349856967094302, 0.9930549237820306, 0.26343920418020805, 0.6943739359274025, 0.09823233938873932, 0.7534403691965718, 0.7398552475673881, 0.1555710404799937, 0.1484835805875444, 0.38080622222386384, 0.6713646870213317, 0.5472395092483366, 0.08423003327212197, 0.6466004957425141, 0.27150872574666385, 0.4829323271794369, 0.31210043906079965, 0.3249582842593215, 0.290427691449503, 0.41155481592833965, 0.8106662674354532, 0.18587851551930668, 0.4528656860956295, 0.17114660326352116, 0.4657061167867842, 0.2678784371054048, 0.9860822027956542, 0.28047740160016876, 0.521866274344278, 0.23089755291895653, 0.26204333667852997, 0.5264128482799174, 0.03426637729358151, 0.7178404125569819, 0.49075453093501586, 0.3174519971304802, 0.580396295921689, 0.8266488621026452, 0.7145309095096285, 0.3501015280428994, 0.6774635074773913, 0.6768061638196861, 0.6997583253682814, 0.8066203028740551, 0.8060843323954033, 0.35281671584294216, 0.8166777460186373, 0.9176081177172289, 0.5015194037604084, 0.5497997542734646, 0.3612105080818233, 0.5588510130880481, 0.6323976574824047, 0.710426913983777, 0.4295719280790321, 0.9106276638850702, 0.2969059720125792, 0.8432199875528353, 0.7024317420417275, 0.009213481391956768, 0.14840918515582413, 0.4529302232160588, 0.6848250846776632, 0.45421324797411733, 0.8959347890115728, 0.16397372493321005, 0.31330878241100824, 0.8970678010214731, 0.5632453945468702, 0.5126777731995182, 0.8704174071253197, 0.23665247116338428, 0.6782310850048989, 0.3099431671901419, 0.5454608867909275, 0.09230030613085294, 0.9458744493467494, 0.41611195633659104, 0.6397763480667221, 0.8384489016228241, 0.09874205494309396, 0.5278468931744442, 0.5438495268719838, 0.55149494135528, 0.14448053384817994, 0.044544066932281634, 0.6612783513242274, 0.3755649576347456, 0.03431220454769368, 0.9934612492190255, 0.7688710280082478, 0.3389545252253131, 0.7738187030110214, 0.8164872467484098, 0.6537895037213985, 0.39219860407683615, 0.7730181491466183, 0.42700223475264354, 0.8372670915582412, 0.5603023624971715, 0.3484920851550566, 0.12206268085300387, 0.027718472955160833, 0.24285845047466093, 0.13038457134274584, 0.1821421457270478, 0.8180641842961788, 0.6468112289433454, 0.6786137832515612, 0.2649645187318215, 0.11295847190839181, 0.7144763224313668, 0.8422882803137242, 0.5918360397074763, 0.02755719654452693, 0.13116827489513205, 0.49030978251776536, 0.3916416343823188, 0.542612607444934, 0.5733307179767209, 0.8826236345600653, 0.9647812905494776, 0.4682062972046238, 0.4705116301141766, 0.769346350896276, 0.3018252236745911, 0.37357948414324493, 0.1990652770918181, 0.4515414233628311, 0.5714040818663472, 0.35356923959515096, 0.08040731267102208, 0.7077296226845344, 0.7613501056061757, 0.6877755636276306, 0.23423531668691677, 0.15732190970119075, 0.01572296878651469, 0.4972830491804182, 0.06953300231224568, 0.9486183952571313, 0.8258159412557152, 0.8759965850303153, 0.5050362417378709, 0.920482499464285, 0.21951268335215468, 0.17591719288392538, 0.183929251947756, 0.3458198381752471, 0.4377243202530733, 0.47258056893381273, 0.6036247398522206, 0.6119589322617547, 0.9254168838168809, 0.5499518801287434, 0.06549122080508862, 0.002345009937452236, 0.7842790516149253, 0.30803301120008, 0.5138356182043174, 0.26838201047138055, 0.5707338026291777, 0.3674770876623539, 0.5538191156986997, 0.553089683547777, 0.9236581903299089, 0.2450054076762701, 0.09995188815404654, 0.333918910608927, 0.33810683615739734, 0.4197761045872076, 0.10930582365824137, 0.19268651403745518, 0.28104316479552793, 0.13985976786349663, 0.08600886760067239, 0.0656213654021297, 0.20133628379098356, 0.9660525097779862, 0.6639676809486362, 0.3732173968706438, 0.938124691115413, 0.24087242309990708, 0.2853633435948504, 0.7724020152231509, 0.9311919103670926, 0.4129195996238262, 0.549424018927679, 0.5713708322304388, 0.8304312892057317, 0.9116587388110712, 0.34586556512679856, 0.007457731400561829, 0.11653803285232622, 0.8153213795722827, 0.3471412438377265, 0.8668860464942315, 0.5117052713795001, 0.27426734321788726, 0.5976215223321437, 0.7804553294199835, 0.9489054134629865, 0.36976800776426366, 0.19709441088456436, 0.8248778946505538, 0.12748719393789132, 0.24491881813804894, 0.7583909969173175, 0.8492236890472936, 0.3160062336108673, 0.44218634017679515, 0.18907910462480781, 0.47734786697519616, 0.09463987861103729, 0.5528685935787785, 0.6610112704878279, 0.8865471529389028, 0.8246710260577944, 0.3880737642012275, 0.5811050568529739, 0.14880638056045825, 0.9276415004469738, 0.6177569381931396, 0.9721131522430645, 0.7353838396758146, 0.7752058260586295, 0.12365050791065424, 0.32465313662264517, 0.8110383623085385, 0.9255192921471196, 0.19706632127489765, 0.37020583290596387, 0.725594740942325, 0.020413393964460846, 0.8881857750967495, 0.9485199875905115, 0.36846960644985616, 0.7918999917529174, 0.423193551068502, 0.27683789749658594, 0.9973755764641876, 0.4369426539414166, 0.5210822181866065, 0.6725181600315542, 0.8844065079838399, 0.7938671324456699, 0.4885784289761004, 0.9208925570401483, 0.9551805020128525, 0.7490598086744121, 0.5314785233220692, 0.08557551651769779, 0.25999214439263596, 0.3263877503823479, 0.23009056001953465, 0.7750140599329359, 0.7603083360926515, 0.4371122196226007, 0.592546574999225, 0.4821310674081929, 0.32436500759864006, 0.8742171703912331, 0.04898062097810041, 0.8003075158126195, 0.17451423533153054, 0.9328154827810852, 0.1949657274732911, 0.12738692278295904, 0.6815430352071549, 0.6749851716467928, 0.21205388564298377, 0.39022749174358295, 0.22704393318795313, 0.5886191069130098, 0.47152988406519647, 0.36682963953924175, 0.2568868081590474, 0.3308967136527572, 0.1502751737108453, 0.13227401066294486, 0.8364865727894538, 0.42464541751131546, 0.12545576758618038, 0.0023779038694338173, 0.8940403774280427, 0.3552112637033934, 0.3095927645685266, 0.014957456013550474, 0.3092687689903968, 0.7595996527232244, 0.838860282628128, 0.18611730064376508, 0.5676321819679359, 0.8381828655393255, 0.4488607859017437, 0.3781759289638611, 0.29064535015201065, 0.0794772225593936, 0.9253770000571481, 0.4183735871388634, 0.910601529377618, 0.42192477480835877, 0.8233923972712007, 0.9105486215288278, 0.49401585809766446, 0.08551880413472723, 0.7993691011952908, 0.6069348982414523, 0.06703257963194686, 0.012015456336609609, 0.6921094126947531, 0.03911318980788714, 0.2462026742757164, 0.23797051075933773, 0.9077271191025862, 0.4876356006796734, 0.594503090962133, 0.3698579698339496, 0.5020034706650011, 0.4397730753924677, 0.3985572387604728, 0.8169456759088498, 0.7012262143279271, 0.7253821399763081, 0.36881581330929647, 0.6131995421946187, 0.9860127149188899, 0.27979538121718317, 0.8737188584162405, 0.7965397248081789, 0.14123154406220895, 0.14034046592971972, 0.8459868501320017, 0.16345744209812085, 0.7532579445397001, 0.43320012365931726, 0.7086148468853519, 0.43637278596129714, 0.47025541700797535, 0.27460675585180294], :type=>\"histogram\"}], @layout={}, @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 = { x: (1..500).map { rand }, type: 'histogram' }\n",
|
48
|
+
"\n",
|
49
|
+
"plot = Plotly::Plot.new(data: [data])\n",
|
50
|
+
"plot.show"
|
51
|
+
]
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"cell_type": "code",
|
55
|
+
"execution_count": null,
|
56
|
+
"metadata": {
|
57
|
+
"collapsed": true
|
58
|
+
},
|
59
|
+
"outputs": [],
|
60
|
+
"source": []
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"metadata": {
|
64
|
+
"kernelspec": {
|
65
|
+
"display_name": "Ruby 2.3.1",
|
66
|
+
"language": "ruby",
|
67
|
+
"name": "ruby"
|
68
|
+
},
|
69
|
+
"language_info": {
|
70
|
+
"file_extension": ".rb",
|
71
|
+
"mimetype": "application/x-ruby",
|
72
|
+
"name": "ruby",
|
73
|
+
"version": "2.3.1"
|
74
|
+
}
|
75
|
+
},
|
76
|
+
"nbformat": 4,
|
77
|
+
"nbformat_minor": 1
|
78
|
+
}
|
@@ -0,0 +1,84 @@
|
|
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=\"adb87990-69aa-40ab-9341-eeb2f8214292\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
|
+
"\n",
|
21
|
+
"<script>\n",
|
22
|
+
" require(['plotly'], function(Plotly) { \n",
|
23
|
+
"Plotly.newPlot(\n",
|
24
|
+
" 'adb87990-69aa-40ab-9341-eeb2f8214292',\n",
|
25
|
+
" [{\"labels\":[\"Residential\",\"Non-Residential\",\"Utility\"],\"values\":[19,26,55],\"type\":\"pie\"}],\n",
|
26
|
+
" {\"title\":\"Forcasted 2014 U.S. PV Installations by Market Segment\"},\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('adb87990-69aa-40ab-9341-eeb2f8214292'))\n",
|
32
|
+
"})\n",
|
33
|
+
" }) \n",
|
34
|
+
"</script>"
|
35
|
+
],
|
36
|
+
"text/plain": [
|
37
|
+
"#<Plotly::Offline::HTML:0x007fb65404ed88 @id=\"adb87990-69aa-40ab-9341-eeb2f8214292\", @data=[{:labels=>[\"Residential\", \"Non-Residential\", \"Utility\"], :values=>[19, 26, 55], :type=>\"pie\"}], @layout={:title=>\"Forcasted 2014 U.S. PV Installations by Market Segment\"}, @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
|
+
" labels: %w(Residential Non-Residential Utility),\n",
|
49
|
+
" values: [19, 26, 55],\n",
|
50
|
+
" type: 'pie'\n",
|
51
|
+
"}\n",
|
52
|
+
"\n",
|
53
|
+
"layout = { title: 'Forcasted 2014 U.S. PV Installations by Market Segment' }\n",
|
54
|
+
"\n",
|
55
|
+
"plot = Plotly::Plot.new(data: [data], layout: layout )\n",
|
56
|
+
"plot.show"
|
57
|
+
]
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"cell_type": "code",
|
61
|
+
"execution_count": null,
|
62
|
+
"metadata": {
|
63
|
+
"collapsed": true
|
64
|
+
},
|
65
|
+
"outputs": [],
|
66
|
+
"source": []
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"metadata": {
|
70
|
+
"kernelspec": {
|
71
|
+
"display_name": "Ruby 2.3.1",
|
72
|
+
"language": "ruby",
|
73
|
+
"name": "ruby"
|
74
|
+
},
|
75
|
+
"language_info": {
|
76
|
+
"file_extension": ".rb",
|
77
|
+
"mimetype": "application/x-ruby",
|
78
|
+
"name": "ruby",
|
79
|
+
"version": "2.3.1"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"nbformat": 4,
|
83
|
+
"nbformat_minor": 1
|
84
|
+
}
|
@@ -16,25 +16,25 @@
|
|
16
16
|
" </script>\n",
|
17
17
|
"\n",
|
18
18
|
"\n",
|
19
|
-
"<div id=\"
|
19
|
+
"<div id=\"920340e0-bd40-4446-940a-ff1e6c0872e1\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
20
|
"\n",
|
21
21
|
"<script>\n",
|
22
22
|
" require(['plotly'], function(Plotly) { \n",
|
23
23
|
"Plotly.newPlot(\n",
|
24
|
-
" '
|
24
|
+
" '920340e0-bd40-4446-940a-ff1e6c0872e1',\n",
|
25
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
|
-
" {
|
26
|
+
" {},\n",
|
27
27
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
28
28
|
")\n",
|
29
29
|
"\n",
|
30
30
|
"window.addEventListener('resize', function() {\n",
|
31
|
-
" Plotly.Plots.resize(document.getElementById('
|
31
|
+
" Plotly.Plots.resize(document.getElementById('920340e0-bd40-4446-940a-ff1e6c0872e1'))\n",
|
32
32
|
"})\n",
|
33
33
|
" }) \n",
|
34
34
|
"</script>"
|
35
35
|
],
|
36
36
|
"text/plain": [
|
37
|
-
"#<Plotly::Offline::HTML:
|
37
|
+
"#<Plotly::Offline::HTML:0x007fd2743299e0 @id=\"920340e0-bd40-4446-940a-ff1e6c0872e1\", @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={}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
38
38
|
]
|
39
39
|
},
|
40
40
|
"metadata": {},
|
@@ -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=\"c757ae6c-042e-4bf2-8533-60cc50ac2490\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
|
+
"\n",
|
21
|
+
"<script>\n",
|
22
|
+
" require(['plotly'], function(Plotly) { \n",
|
23
|
+
"Plotly.newPlot(\n",
|
24
|
+
" 'c757ae6c-042e-4bf2-8533-60cc50ac2490',\n",
|
25
|
+
" [{\"x\":[\"x1\",\"x2\",\"x3\",\"x4\",\"x5\",\"x6\",\"x7\",\"x8\",\"x9\",\"x10\"],\"y\":[\"y1\",\"y2\",\"y3\",\"y4\",\"y5\",\"y6\",\"y7\",\"y8\",\"y9\",\"y10\"],\"z\":[[9,0,0,7,0,8,0,0,4,0],[7,7,0,9,2,3,1,2,4,8],[5,7,9,0,5,0,4,3,0,0],[3,9,1,5,0,3,1,0,2,7],[8,4,6,4,6,9,3,5,8,4],[3,8,0,2,9,4,6,5,8,5],[5,9,1,5,8,6,5,4,0,5],[3,7,4,2,5,6,1,1,3,7],[2,4,4,4,3,3,5,3,2,9],[3,6,5,0,0,5,1,1,4,0]],\"type\":\"heatmap\"}],\n",
|
26
|
+
" {\"width\":500,\"height\":500},\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('c757ae6c-042e-4bf2-8533-60cc50ac2490'))\n",
|
32
|
+
"})\n",
|
33
|
+
" }) \n",
|
34
|
+
"</script>"
|
35
|
+
],
|
36
|
+
"text/plain": [
|
37
|
+
"#<Plotly::Offline::HTML:0x007fe22b083530 @id=\"c757ae6c-042e-4bf2-8533-60cc50ac2490\", @data=[{:x=>[\"x1\", \"x2\", \"x3\", \"x4\", \"x5\", \"x6\", \"x7\", \"x8\", \"x9\", \"x10\"], :y=>[\"y1\", \"y2\", \"y3\", \"y4\", \"y5\", \"y6\", \"y7\", \"y8\", \"y9\", \"y10\"], :z=>[[9, 0, 0, 7, 0, 8, 0, 0, 4, 0], [7, 7, 0, 9, 2, 3, 1, 2, 4, 8], [5, 7, 9, 0, 5, 0, 4, 3, 0, 0], [3, 9, 1, 5, 0, 3, 1, 0, 2, 7], [8, 4, 6, 4, 6, 9, 3, 5, 8, 4], [3, 8, 0, 2, 9, 4, 6, 5, 8, 5], [5, 9, 1, 5, 8, 6, 5, 4, 0, 5], [3, 7, 4, 2, 5, 6, 1, 1, 3, 7], [2, 4, 4, 4, 3, 3, 5, 3, 2, 9], [3, 6, 5, 0, 0, 5, 1, 1, 4, 0]], :type=>:heatmap}], @layout={:width=>500, :height=>500}, @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 = 10\n",
|
48
|
+
"data = {\n",
|
49
|
+
" x: (1..n).map { |i| \"x#{i}\" },\n",
|
50
|
+
" y: (1..n).map { |i| \"y#{i}\" },\n",
|
51
|
+
" z: (1..n).map { (1..n).map { rand(10) } },\n",
|
52
|
+
" type: :heatmap\n",
|
53
|
+
"}\n",
|
54
|
+
"\n",
|
55
|
+
"layout = {\n",
|
56
|
+
" width: 500,\n",
|
57
|
+
" height: 500\n",
|
58
|
+
"}\n",
|
59
|
+
"\n",
|
60
|
+
"plot = Plotly::Plot.new(data: [data], layout: layout)\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=\"6d1a85c0-74cb-48ee-9685-748bec582951\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
|
+
"\n",
|
21
|
+
"<script>\n",
|
22
|
+
" require(['plotly'], function(Plotly) { \n",
|
23
|
+
"Plotly.newPlot(\n",
|
24
|
+
" '6d1a85c0-74cb-48ee-9685-748bec582951',\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\":[5.643574849105169,4.961306066758519,4.060934803889124,3.414571515778032,3.197411503903012,3.2278637301592594,4.872105605880176,3.186894287301045,6.410507190686895,3.654375394859363,6.144401812948679,5.192899463415073,5.8904630069303625,4.049320930799653,4.864790426688506,4.816183710450119,6.099187602311419,3.9171455780212807,4.866614613413191,6.697259779947566,3.694022532442527,6.353507144539263,4.904665442566774,3.5897970270002344,4.45139368897716,3.923280428362602,5.281395053251372,4.8419034933281075,4.203666147182073,4.746377891662435,4.361637820104374,5.627462789773117,5.351768666729981,3.094692385328164,6.839030054843362,3.278166743991193,3.830059270315399,6.2024506808018245,6.214265570110114,4.202385347823167,3.8997675180587303,3.5805583787387603,3.7950796359559567,3.171619362136638,5.275605617318684,6.635818464397435,5.4106155598873045,5.076774881525382,3.0837731858523707,3.708524967452129,4.438729561323523,5.067911535349737,4.091430591263282,3.6341389770411716,5.188335596317376,4.236649806919521,4.71829089522835,4.932248853636338,5.126123634687506,3.1039398214544827,6.930884750814518,4.91388661568968,5.379882791817321,6.176476695475962,5.990598138280438,6.291616808752844,5.201026929785126,4.977227740756096,3.198345596621278,4.50300724674422,3.029246325995899,4.014484155725455,3.3953501769715344,6.1901035285059995,4.704259693763614,6.137490821869501,4.902373381687166,4.992645940018968,6.268387227733969,4.634123687345734,4.681321142919827,6.802345377946052,3.3732407151503883,3.99658618737928,3.1025732739847025,6.002190089000578,6.95813133077629,4.0285761714101325,4.902367512489361,6.044006159970719,5.62940680404261,3.8853853027542424,5.590250253235214,4.374223013871178,4.754674417824647,4.606267039693784,3.8201755584054613,4.140672180845154,3.6989351781619533,5.7879841884565035,5.228441158043866],\"type\":\"scatter\",\"mode\":\"markers\"},{\"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.8123607631786989,0.6146169695782269,-0.3497125391837561,-1.7494008686778253,0.8405806642848646,-0.8685408305210895,1.5329911873486615,-1.5835862397077083,-1.1818725686376128,1.574566945670453,1.8946753298989503,0.0720703976079462,-1.841159200976508,-1.7973525499084473,-0.17920297543475838,-0.7783156561426683,-0.6636585078502568,-0.9963484955312878,0.7968646130257651,1.4935185882875266,-0.033446058059578565,1.5496760229169326,-1.8124719780617418,-0.23314695457637535,1.0205724741886626,1.6893853411324709,-0.16066707293111548,1.6018862547070132,1.084765986212242,-0.30561398681465013,-0.3946264344948185,1.2519863402128149,-1.5491223802078684,-1.777165108138207,1.5790812673974708,0.6903880978976598,0.8824775837620655,1.5200700593452132,-1.8203846413127147,-1.6926108335067376,-0.939256717542476,1.7945969315376935,-1.2657096003072419,0.005677906072131478,-1.76733207641298,-0.5343727300838585,1.5961335674372492,-1.5010492315163124,0.30141376343729664,0.10641157413967273,-1.2208407071451743,0.2488828609220035,-1.081750317845807,0.15942886694990532,1.018956488329232,0.09691800433603737,-1.7448195686629204,-0.550384545829909,-0.9170856982914808,-0.8303886960218696,1.6758207311208788,-0.16145490372659488,0.7166817171917286,-1.3790887539829901,-0.726103928363492,0.4238421495317666,-0.11264580203837937,0.6173502320405349,-1.3294862728201489,0.40597717131517497,-0.12852003805824586,-1.3887347168891018,-1.4891091011568056,-0.8974736999169926,-1.380750276361817,-1.4570191330894184,-0.5567540128414512,0.6796992857518545,-0.8591924877967498,-0.8265235082791564,-1.4608891169553169,-1.6860024085779601,-0.33456399693442807,0.660125591962212,1.0316225228143354,-0.5501283120067075,-1.4714670266677947,-1.9920965144265828,-0.1454979863753043,-0.8038427045937353,0.19270179130817944,-1.4915761158223577,-0.3978404369994788,-0.9482199301688565,0.24458857930165934,1.4648824507754217,-0.9364069117828606,-1.8632178445680139,1.7683654986028743,0.6317118708119076,0.27850249217773726],\"type\":\"scatter\",\"mode\":\"markers+lines\"}],\n",
|
26
|
+
" {},\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('6d1a85c0-74cb-48ee-9685-748bec582951'))\n",
|
32
|
+
"})\n",
|
33
|
+
" }) \n",
|
34
|
+
"</script>"
|
35
|
+
],
|
36
|
+
"text/plain": [
|
37
|
+
"#<Plotly::Offline::HTML:0x007fdb8b314200 @id=\"6d1a85c0-74cb-48ee-9685-748bec582951\", @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=>[5.643574849105169, 4.961306066758519, 4.060934803889124, 3.414571515778032, 3.197411503903012, 3.2278637301592594, 4.872105605880176, 3.186894287301045, 6.410507190686895, 3.654375394859363, 6.144401812948679, 5.192899463415073, 5.8904630069303625, 4.049320930799653, 4.864790426688506, 4.816183710450119, 6.099187602311419, 3.9171455780212807, 4.866614613413191, 6.697259779947566, 3.694022532442527, 6.353507144539263, 4.904665442566774, 3.5897970270002344, 4.45139368897716, 3.923280428362602, 5.281395053251372, 4.8419034933281075, 4.203666147182073, 4.746377891662435, 4.361637820104374, 5.627462789773117, 5.351768666729981, 3.094692385328164, 6.839030054843362, 3.278166743991193, 3.830059270315399, 6.2024506808018245, 6.214265570110114, 4.202385347823167, 3.8997675180587303, 3.5805583787387603, 3.7950796359559567, 3.171619362136638, 5.275605617318684, 6.635818464397435, 5.4106155598873045, 5.076774881525382, 3.0837731858523707, 3.708524967452129, 4.438729561323523, 5.067911535349737, 4.091430591263282, 3.6341389770411716, 5.188335596317376, 4.236649806919521, 4.71829089522835, 4.932248853636338, 5.126123634687506, 3.1039398214544827, 6.930884750814518, 4.91388661568968, 5.379882791817321, 6.176476695475962, 5.990598138280438, 6.291616808752844, 5.201026929785126, 4.977227740756096, 3.198345596621278, 4.50300724674422, 3.029246325995899, 4.014484155725455, 3.3953501769715344, 6.1901035285059995, 4.704259693763614, 6.137490821869501, 4.902373381687166, 4.992645940018968, 6.268387227733969, 4.634123687345734, 4.681321142919827, 6.802345377946052, 3.3732407151503883, 3.99658618737928, 3.1025732739847025, 6.002190089000578, 6.95813133077629, 4.0285761714101325, 4.902367512489361, 6.044006159970719, 5.62940680404261, 3.8853853027542424, 5.590250253235214, 4.374223013871178, 4.754674417824647, 4.606267039693784, 3.8201755584054613, 4.140672180845154, 3.6989351781619533, 5.7879841884565035, 5.228441158043866], :type=>\"scatter\", :mode=>\"markers\"}, {: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.8123607631786989, 0.6146169695782269, -0.3497125391837561, -1.7494008686778253, 0.8405806642848646, -0.8685408305210895, 1.5329911873486615, -1.5835862397077083, -1.1818725686376128, 1.574566945670453, 1.8946753298989503, 0.0720703976079462, -1.841159200976508, -1.7973525499084473, -0.17920297543475838, -0.7783156561426683, -0.6636585078502568, -0.9963484955312878, 0.7968646130257651, 1.4935185882875266, -0.033446058059578565, 1.5496760229169326, -1.8124719780617418, -0.23314695457637535, 1.0205724741886626, 1.6893853411324709, -0.16066707293111548, 1.6018862547070132, 1.084765986212242, -0.30561398681465013, -0.3946264344948185, 1.2519863402128149, -1.5491223802078684, -1.777165108138207, 1.5790812673974708, 0.6903880978976598, 0.8824775837620655, 1.5200700593452132, -1.8203846413127147, -1.6926108335067376, -0.939256717542476, 1.7945969315376935, -1.2657096003072419, 0.005677906072131478, -1.76733207641298, -0.5343727300838585, 1.5961335674372492, -1.5010492315163124, 0.30141376343729664, 0.10641157413967273, -1.2208407071451743, 0.2488828609220035, -1.081750317845807, 0.15942886694990532, 1.018956488329232, 0.09691800433603737, -1.7448195686629204, -0.550384545829909, -0.9170856982914808, -0.8303886960218696, 1.6758207311208788, -0.16145490372659488, 0.7166817171917286, -1.3790887539829901, -0.726103928363492, 0.4238421495317666, -0.11264580203837937, 0.6173502320405349, -1.3294862728201489, 0.40597717131517497, -0.12852003805824586, -1.3887347168891018, -1.4891091011568056, -0.8974736999169926, -1.380750276361817, -1.4570191330894184, -0.5567540128414512, 0.6796992857518545, -0.8591924877967498, -0.8265235082791564, -1.4608891169553169, -1.6860024085779601, -0.33456399693442807, 0.660125591962212, 1.0316225228143354, -0.5501283120067075, -1.4714670266677947, -1.9920965144265828, -0.1454979863753043, -0.8038427045937353, 0.19270179130817944, -1.4915761158223577, -0.3978404369994788, -0.9482199301688565, 0.24458857930165934, 1.4648824507754217, -0.9364069117828606, -1.8632178445680139, 1.7683654986028743, 0.6317118708119076, 0.27850249217773726], :type=>\"scatter\", :mode=>\"markers+lines\"}], @layout={}, @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=\"ca90b2d8-46df-4529-95a8-90a3e48e32ce\" style=\"height: 100%; width: 100%;\"></div>\n",
|
77
|
+
"\n",
|
78
|
+
"<script>\n",
|
79
|
+
" require(['plotly'], function(Plotly) { \n",
|
80
|
+
"Plotly.newPlot(\n",
|
81
|
+
" 'ca90b2d8-46df-4529-95a8-90a3e48e32ce',\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\":[5.643574849105169,4.961306066758519,4.060934803889124,3.414571515778032,3.197411503903012,3.2278637301592594,4.872105605880176,3.186894287301045,6.410507190686895,3.654375394859363,6.144401812948679,5.192899463415073,5.8904630069303625,4.049320930799653,4.864790426688506,4.816183710450119,6.099187602311419,3.9171455780212807,4.866614613413191,6.697259779947566,3.694022532442527,6.353507144539263,4.904665442566774,3.5897970270002344,4.45139368897716,3.923280428362602,5.281395053251372,4.8419034933281075,4.203666147182073,4.746377891662435,4.361637820104374,5.627462789773117,5.351768666729981,3.094692385328164,6.839030054843362,3.278166743991193,3.830059270315399,6.2024506808018245,6.214265570110114,4.202385347823167,3.8997675180587303,3.5805583787387603,3.7950796359559567,3.171619362136638,5.275605617318684,6.635818464397435,5.4106155598873045,5.076774881525382,3.0837731858523707,3.708524967452129,4.438729561323523,5.067911535349737,4.091430591263282,3.6341389770411716,5.188335596317376,4.236649806919521,4.71829089522835,4.932248853636338,5.126123634687506,3.1039398214544827,6.930884750814518,4.91388661568968,5.379882791817321,6.176476695475962,5.990598138280438,6.291616808752844,5.201026929785126,4.977227740756096,3.198345596621278,4.50300724674422,3.029246325995899,4.014484155725455,3.3953501769715344,6.1901035285059995,4.704259693763614,6.137490821869501,4.902373381687166,4.992645940018968,6.268387227733969,4.634123687345734,4.681321142919827,6.802345377946052,3.3732407151503883,3.99658618737928,3.1025732739847025,6.002190089000578,6.95813133077629,4.0285761714101325,4.902367512489361,6.044006159970719,5.62940680404261,3.8853853027542424,5.590250253235214,4.374223013871178,4.754674417824647,4.606267039693784,3.8201755584054613,4.140672180845154,3.6989351781619533,5.7879841884565035,5.228441158043866],\"type\":\"scatter\",\"mode\":\"markers\"},{\"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.2918470322309492,0.06784672036348016,-0.25527629967714394,0.29401864561379876,-0.08568254608572456,0.17712162743022564,0.26627759005907503,0.020384797819056444,0.28502289639693523,0.08007853199056048,-0.19734214257260274,0.11817015271094344,-0.027903131339155562,0.04553219635709904,0.4055360939507664,-0.45509583087448746,-0.33102521139201024,0.06941561309717514,0.017814885421255422,0.4793591894071675,0.07162445344284951,0.3344137369225737,0.4448499371114156,0.251494553190321,0.3447209883729694,-0.45099499352739925,0.004783736692153151,0.14339717138861385,0.26628704140365667,-0.2629054066581673,-0.4503577922538329,0.08265760555530632,-0.22143991811936414,-0.23580415456704396,0.26322659840296936,-0.128788848929415,-0.4170688408115917,-0.014077203115443027,0.3395412388199053,-0.4850347285370541,0.4960429773944819,0.3040784936087565,0.16948992932608808,0.4077010559984423,-0.3886198372731159,-0.34784790849691916,0.29202365040433176,-0.18168304192783602,-0.0367643830189156,-0.21911865820667176,0.020101721514611315,-0.05111380252546571,0.4949648524115432,-0.24758597930070703,0.01660629531212976,0.016854088964895042,-0.4665684099945626,0.3566923305416577,-0.4092945154102625,-0.13259686509784563,0.45300974197215516,0.45410647894310074,0.45495676434830457,0.15086320701033495,0.2934602634074398,-0.0903957850447864,0.49890589904526295,0.3792028397429186,-0.4721034288623185,0.11137669317514398,0.3985340067747464,0.2508261947952485,-0.0645820819035493,0.35693729492652293,-0.30828956162814736,0.4993844733250866,-0.44435233382164685,-0.043080446873944966,-0.3432782593068676,-0.4240771326034558,0.32542579346206735,0.29953033373629523,0.1687090840705241,0.3555759037032399,-0.21620013268854754,0.07570042984091019,-0.39864335805086437,0.2804345656617052,0.19934148576641586,0.31810414669918974,-0.165606670036899,0.26578729184618066,0.2474034933969026,-0.39983517652623746,-0.4344252880801087,-0.03626036802717547,-0.03005067553304208,0.38095357564818966,0.4139286965201181,-0.3988083478311877,-0.3342289107811315],\"type\":\"scatter\",\"mode\":\"markers+lines\"}],\n",
|
83
|
+
" {},\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('ca90b2d8-46df-4529-95a8-90a3e48e32ce'))\n",
|
89
|
+
"})\n",
|
90
|
+
" }) \n",
|
91
|
+
"</script>"
|
92
|
+
],
|
93
|
+
"text/plain": [
|
94
|
+
"#<Plotly::Offline::HTML:0x007fdb8b23fbe0 @id=\"ca90b2d8-46df-4529-95a8-90a3e48e32ce\", @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=>[5.643574849105169, 4.961306066758519, 4.060934803889124, 3.414571515778032, 3.197411503903012, 3.2278637301592594, 4.872105605880176, 3.186894287301045, 6.410507190686895, 3.654375394859363, 6.144401812948679, 5.192899463415073, 5.8904630069303625, 4.049320930799653, 4.864790426688506, 4.816183710450119, 6.099187602311419, 3.9171455780212807, 4.866614613413191, 6.697259779947566, 3.694022532442527, 6.353507144539263, 4.904665442566774, 3.5897970270002344, 4.45139368897716, 3.923280428362602, 5.281395053251372, 4.8419034933281075, 4.203666147182073, 4.746377891662435, 4.361637820104374, 5.627462789773117, 5.351768666729981, 3.094692385328164, 6.839030054843362, 3.278166743991193, 3.830059270315399, 6.2024506808018245, 6.214265570110114, 4.202385347823167, 3.8997675180587303, 3.5805583787387603, 3.7950796359559567, 3.171619362136638, 5.275605617318684, 6.635818464397435, 5.4106155598873045, 5.076774881525382, 3.0837731858523707, 3.708524967452129, 4.438729561323523, 5.067911535349737, 4.091430591263282, 3.6341389770411716, 5.188335596317376, 4.236649806919521, 4.71829089522835, 4.932248853636338, 5.126123634687506, 3.1039398214544827, 6.930884750814518, 4.91388661568968, 5.379882791817321, 6.176476695475962, 5.990598138280438, 6.291616808752844, 5.201026929785126, 4.977227740756096, 3.198345596621278, 4.50300724674422, 3.029246325995899, 4.014484155725455, 3.3953501769715344, 6.1901035285059995, 4.704259693763614, 6.137490821869501, 4.902373381687166, 4.992645940018968, 6.268387227733969, 4.634123687345734, 4.681321142919827, 6.802345377946052, 3.3732407151503883, 3.99658618737928, 3.1025732739847025, 6.002190089000578, 6.95813133077629, 4.0285761714101325, 4.902367512489361, 6.044006159970719, 5.62940680404261, 3.8853853027542424, 5.590250253235214, 4.374223013871178, 4.754674417824647, 4.606267039693784, 3.8201755584054613, 4.140672180845154, 3.6989351781619533, 5.7879841884565035, 5.228441158043866], :type=>\"scatter\", :mode=>\"markers\"}, {: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.2918470322309492, 0.06784672036348016, -0.25527629967714394, 0.29401864561379876, -0.08568254608572456, 0.17712162743022564, 0.26627759005907503, 0.020384797819056444, 0.28502289639693523, 0.08007853199056048, -0.19734214257260274, 0.11817015271094344, -0.027903131339155562, 0.04553219635709904, 0.4055360939507664, -0.45509583087448746, -0.33102521139201024, 0.06941561309717514, 0.017814885421255422, 0.4793591894071675, 0.07162445344284951, 0.3344137369225737, 0.4448499371114156, 0.251494553190321, 0.3447209883729694, -0.45099499352739925, 0.004783736692153151, 0.14339717138861385, 0.26628704140365667, -0.2629054066581673, -0.4503577922538329, 0.08265760555530632, -0.22143991811936414, -0.23580415456704396, 0.26322659840296936, -0.128788848929415, -0.4170688408115917, -0.014077203115443027, 0.3395412388199053, -0.4850347285370541, 0.4960429773944819, 0.3040784936087565, 0.16948992932608808, 0.4077010559984423, -0.3886198372731159, -0.34784790849691916, 0.29202365040433176, -0.18168304192783602, -0.0367643830189156, -0.21911865820667176, 0.020101721514611315, -0.05111380252546571, 0.4949648524115432, -0.24758597930070703, 0.01660629531212976, 0.016854088964895042, -0.4665684099945626, 0.3566923305416577, -0.4092945154102625, -0.13259686509784563, 0.45300974197215516, 0.45410647894310074, 0.45495676434830457, 0.15086320701033495, 0.2934602634074398, -0.0903957850447864, 0.49890589904526295, 0.3792028397429186, -0.4721034288623185, 0.11137669317514398, 0.3985340067747464, 0.2508261947952485, -0.0645820819035493, 0.35693729492652293, -0.30828956162814736, 0.4993844733250866, -0.44435233382164685, -0.043080446873944966, -0.3432782593068676, -0.4240771326034558, 0.32542579346206735, 0.29953033373629523, 0.1687090840705241, 0.3555759037032399, -0.21620013268854754, 0.07570042984091019, -0.39864335805086437, 0.2804345656617052, 0.19934148576641586, 0.31810414669918974, -0.165606670036899, 0.26578729184618066, 0.2474034933969026, -0.39983517652623746, -0.4344252880801087, -0.03626036802717547, -0.03005067553304208, 0.38095357564818966, 0.4139286965201181, -0.3988083478311877, -0.3342289107811315], :type=>\"scatter\", :mode=>\"markers+lines\"}], @layout={}, @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=\"2fd68f11-927b-476e-800f-7871618e25f5\" style=\"height: 100%; width: 100%;\"></div>\n",
|
123
|
+
"\n",
|
124
|
+
"<script>\n",
|
125
|
+
" require(['plotly'], function(Plotly) { \n",
|
126
|
+
"Plotly.newPlot(\n",
|
127
|
+
" '2fd68f11-927b-476e-800f-7871618e25f5',\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\":[5.643574849105169,4.961306066758519,4.060934803889124,3.414571515778032,3.197411503903012,3.2278637301592594,4.872105605880176,3.186894287301045,6.410507190686895,3.654375394859363,6.144401812948679,5.192899463415073,5.8904630069303625,4.049320930799653,4.864790426688506,4.816183710450119,6.099187602311419,3.9171455780212807,4.866614613413191,6.697259779947566,3.694022532442527,6.353507144539263,4.904665442566774,3.5897970270002344,4.45139368897716,3.923280428362602,5.281395053251372,4.8419034933281075,4.203666147182073,4.746377891662435,4.361637820104374,5.627462789773117,5.351768666729981,3.094692385328164,6.839030054843362,3.278166743991193,3.830059270315399,6.2024506808018245,6.214265570110114,4.202385347823167,3.8997675180587303,3.5805583787387603,3.7950796359559567,3.171619362136638,5.275605617318684,6.635818464397435,5.4106155598873045,5.076774881525382,3.0837731858523707,3.708524967452129,4.438729561323523,5.067911535349737,4.091430591263282,3.6341389770411716,5.188335596317376,4.236649806919521,4.71829089522835,4.932248853636338,5.126123634687506,3.1039398214544827,6.930884750814518,4.91388661568968,5.379882791817321,6.176476695475962,5.990598138280438,6.291616808752844,5.201026929785126,4.977227740756096,3.198345596621278,4.50300724674422,3.029246325995899,4.014484155725455,3.3953501769715344,6.1901035285059995,4.704259693763614,6.137490821869501,4.902373381687166,4.992645940018968,6.268387227733969,4.634123687345734,4.681321142919827,6.802345377946052,3.3732407151503883,3.99658618737928,3.1025732739847025,6.002190089000578,6.95813133077629,4.0285761714101325,4.902367512489361,6.044006159970719,5.62940680404261,3.8853853027542424,5.590250253235214,4.374223013871178,4.754674417824647,4.606267039693784,3.8201755584054613,4.140672180845154,3.6989351781619533,5.7879841884565035,5.228441158043866],\"type\":\"scatter\",\"mode\":\"markers\"},{\"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.2918470322309492,0.06784672036348016,-0.25527629967714394,0.29401864561379876,-0.08568254608572456,0.17712162743022564,0.26627759005907503,0.020384797819056444,0.28502289639693523,0.08007853199056048,-0.19734214257260274,0.11817015271094344,-0.027903131339155562,0.04553219635709904,0.4055360939507664,-0.45509583087448746,-0.33102521139201024,0.06941561309717514,0.017814885421255422,0.4793591894071675,0.07162445344284951,0.3344137369225737,0.4448499371114156,0.251494553190321,0.3447209883729694,-0.45099499352739925,0.004783736692153151,0.14339717138861385,0.26628704140365667,-0.2629054066581673,-0.4503577922538329,0.08265760555530632,-0.22143991811936414,-0.23580415456704396,0.26322659840296936,-0.128788848929415,-0.4170688408115917,-0.014077203115443027,0.3395412388199053,-0.4850347285370541,0.4960429773944819,0.3040784936087565,0.16948992932608808,0.4077010559984423,-0.3886198372731159,-0.34784790849691916,0.29202365040433176,-0.18168304192783602,-0.0367643830189156,-0.21911865820667176,0.020101721514611315,-0.05111380252546571,0.4949648524115432,-0.24758597930070703,0.01660629531212976,0.016854088964895042,-0.4665684099945626,0.3566923305416577,-0.4092945154102625,-0.13259686509784563,0.45300974197215516,0.45410647894310074,0.45495676434830457,0.15086320701033495,0.2934602634074398,-0.0903957850447864,0.49890589904526295,0.3792028397429186,-0.4721034288623185,0.11137669317514398,0.3985340067747464,0.2508261947952485,-0.0645820819035493,0.35693729492652293,-0.30828956162814736,0.4993844733250866,-0.44435233382164685,-0.043080446873944966,-0.3432782593068676,-0.4240771326034558,0.32542579346206735,0.29953033373629523,0.1687090840705241,0.3555759037032399,-0.21620013268854754,0.07570042984091019,-0.39864335805086437,0.2804345656617052,0.19934148576641586,0.31810414669918974,-0.165606670036899,0.26578729184618066,0.2474034933969026,-0.39983517652623746,-0.4344252880801087,-0.03626036802717547,-0.03005067553304208,0.38095357564818966,0.4139286965201181,-0.3988083478311877,-0.3342289107811315],\"type\":\"scatter\",\"mode\":\"markers+lines\"},{\"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.118541279858697,-4.336928800939507,-3.9385408402956856,-5.13510660947426,-4.375182681191897,-4.266382896354829,-6.693443541975876,-6.068485174327739,-5.434508056276314,-6.348461280217517,-5.905133751421397,-5.213224971463147,-3.5734488291532553,-5.972821323626621,-6.668739355256433,-6.58990218086364,-6.1131559491866465,-5.426205049616756,-4.899390759059109,-5.095936685076762,-6.439631349138296,-3.7398545218636605,-3.250041192105066,-4.158814185998766,-5.418745598349464,-6.242926036175403,-5.973966460366805,-6.312228424139535,-6.520655870249062,-6.865773343104487,-3.3008248597542553,-6.277665827849311,-6.162921326750342,-3.135067725585891,-6.2572485618789875,-6.306895083670741,-5.353938555632384,-3.9295367886096355,-3.6233239677235125,-3.5643818702980914,-5.69180840299496,-5.313294977420196,-6.314156738567251,-3.623851578109708,-5.076276675460165,-5.012832082845858,-5.904876759183978,-6.596270545713277,-5.342939206155604,-6.535379955178368,-4.550847760425438,-5.588014465130651,-4.088429607922308,-3.736465125338768,-3.498656210626582,-5.337687693604439,-4.220374167524718,-6.635002232099147,-4.840706384807957,-4.413167412082267,-6.064534734908628,-3.063899010586587,-3.0755793590099243,-6.609516541588117,-3.3900904528581925,-5.717459621278913,-4.747963151238187,-5.509311838115293,-4.546430901778218,-6.179389954620724,-6.326344499974565,-5.702153345566668,-4.697112553635738,-4.307817127690438,-5.306232181842763,-4.6888424726672895,-6.116099946507546,-5.459651715947887,-3.434443858297593,-3.027927355248377,-3.9598318496065086,-3.9336284183578507,-6.164724361210634,-5.1866572534102815,-4.988434421931455,-3.4106670454991024,-5.267104798446782,-4.454298342677626,-5.513140188559842,-6.349988769692197,-4.176749108266341,-4.06241885927677,-5.928197893742187,-4.164944572840207,-5.685906073404755,-4.741524561494865,-5.621053943182366,-3.7275906014333917,-4.912460964591176,-4.722591380631442,-6.836170464036709],\"type\":\"scatter\",\"mode\":\"lines\"}],\n",
|
129
|
+
" {},\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('2fd68f11-927b-476e-800f-7871618e25f5'))\n",
|
135
|
+
"})\n",
|
136
|
+
" }) \n",
|
137
|
+
"</script>"
|
138
|
+
],
|
139
|
+
"text/plain": [
|
140
|
+
"#<Plotly::Offline::HTML:0x007fdb8b184a20 @id=\"2fd68f11-927b-476e-800f-7871618e25f5\", @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=>[5.643574849105169, 4.961306066758519, 4.060934803889124, 3.414571515778032, 3.197411503903012, 3.2278637301592594, 4.872105605880176, 3.186894287301045, 6.410507190686895, 3.654375394859363, 6.144401812948679, 5.192899463415073, 5.8904630069303625, 4.049320930799653, 4.864790426688506, 4.816183710450119, 6.099187602311419, 3.9171455780212807, 4.866614613413191, 6.697259779947566, 3.694022532442527, 6.353507144539263, 4.904665442566774, 3.5897970270002344, 4.45139368897716, 3.923280428362602, 5.281395053251372, 4.8419034933281075, 4.203666147182073, 4.746377891662435, 4.361637820104374, 5.627462789773117, 5.351768666729981, 3.094692385328164, 6.839030054843362, 3.278166743991193, 3.830059270315399, 6.2024506808018245, 6.214265570110114, 4.202385347823167, 3.8997675180587303, 3.5805583787387603, 3.7950796359559567, 3.171619362136638, 5.275605617318684, 6.635818464397435, 5.4106155598873045, 5.076774881525382, 3.0837731858523707, 3.708524967452129, 4.438729561323523, 5.067911535349737, 4.091430591263282, 3.6341389770411716, 5.188335596317376, 4.236649806919521, 4.71829089522835, 4.932248853636338, 5.126123634687506, 3.1039398214544827, 6.930884750814518, 4.91388661568968, 5.379882791817321, 6.176476695475962, 5.990598138280438, 6.291616808752844, 5.201026929785126, 4.977227740756096, 3.198345596621278, 4.50300724674422, 3.029246325995899, 4.014484155725455, 3.3953501769715344, 6.1901035285059995, 4.704259693763614, 6.137490821869501, 4.902373381687166, 4.992645940018968, 6.268387227733969, 4.634123687345734, 4.681321142919827, 6.802345377946052, 3.3732407151503883, 3.99658618737928, 3.1025732739847025, 6.002190089000578, 6.95813133077629, 4.0285761714101325, 4.902367512489361, 6.044006159970719, 5.62940680404261, 3.8853853027542424, 5.590250253235214, 4.374223013871178, 4.754674417824647, 4.606267039693784, 3.8201755584054613, 4.140672180845154, 3.6989351781619533, 5.7879841884565035, 5.228441158043866], :type=>\"scatter\", :mode=>\"markers\"}, {: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.2918470322309492, 0.06784672036348016, -0.25527629967714394, 0.29401864561379876, -0.08568254608572456, 0.17712162743022564, 0.26627759005907503, 0.020384797819056444, 0.28502289639693523, 0.08007853199056048, -0.19734214257260274, 0.11817015271094344, -0.027903131339155562, 0.04553219635709904, 0.4055360939507664, -0.45509583087448746, -0.33102521139201024, 0.06941561309717514, 0.017814885421255422, 0.4793591894071675, 0.07162445344284951, 0.3344137369225737, 0.4448499371114156, 0.251494553190321, 0.3447209883729694, -0.45099499352739925, 0.004783736692153151, 0.14339717138861385, 0.26628704140365667, -0.2629054066581673, -0.4503577922538329, 0.08265760555530632, -0.22143991811936414, -0.23580415456704396, 0.26322659840296936, -0.128788848929415, -0.4170688408115917, -0.014077203115443027, 0.3395412388199053, -0.4850347285370541, 0.4960429773944819, 0.3040784936087565, 0.16948992932608808, 0.4077010559984423, -0.3886198372731159, -0.34784790849691916, 0.29202365040433176, -0.18168304192783602, -0.0367643830189156, -0.21911865820667176, 0.020101721514611315, -0.05111380252546571, 0.4949648524115432, -0.24758597930070703, 0.01660629531212976, 0.016854088964895042, -0.4665684099945626, 0.3566923305416577, -0.4092945154102625, -0.13259686509784563, 0.45300974197215516, 0.45410647894310074, 0.45495676434830457, 0.15086320701033495, 0.2934602634074398, -0.0903957850447864, 0.49890589904526295, 0.3792028397429186, -0.4721034288623185, 0.11137669317514398, 0.3985340067747464, 0.2508261947952485, -0.0645820819035493, 0.35693729492652293, -0.30828956162814736, 0.4993844733250866, -0.44435233382164685, -0.043080446873944966, -0.3432782593068676, -0.4240771326034558, 0.32542579346206735, 0.29953033373629523, 0.1687090840705241, 0.3555759037032399, -0.21620013268854754, 0.07570042984091019, -0.39864335805086437, 0.2804345656617052, 0.19934148576641586, 0.31810414669918974, -0.165606670036899, 0.26578729184618066, 0.2474034933969026, -0.39983517652623746, -0.4344252880801087, -0.03626036802717547, -0.03005067553304208, 0.38095357564818966, 0.4139286965201181, -0.3988083478311877, -0.3342289107811315], :type=>\"scatter\", :mode=>\"markers+lines\"}, {: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.118541279858697, -4.336928800939507, -3.9385408402956856, -5.13510660947426, -4.375182681191897, -4.266382896354829, -6.693443541975876, -6.068485174327739, -5.434508056276314, -6.348461280217517, -5.905133751421397, -5.213224971463147, -3.5734488291532553, -5.972821323626621, -6.668739355256433, -6.58990218086364, -6.1131559491866465, -5.426205049616756, -4.899390759059109, -5.095936685076762, -6.439631349138296, -3.7398545218636605, -3.250041192105066, -4.158814185998766, -5.418745598349464, -6.242926036175403, -5.973966460366805, -6.312228424139535, -6.520655870249062, -6.865773343104487, -3.3008248597542553, -6.277665827849311, -6.162921326750342, -3.135067725585891, -6.2572485618789875, -6.306895083670741, -5.353938555632384, -3.9295367886096355, -3.6233239677235125, -3.5643818702980914, -5.69180840299496, -5.313294977420196, -6.314156738567251, -3.623851578109708, -5.076276675460165, -5.012832082845858, -5.904876759183978, -6.596270545713277, -5.342939206155604, -6.535379955178368, -4.550847760425438, -5.588014465130651, -4.088429607922308, -3.736465125338768, -3.498656210626582, -5.337687693604439, -4.220374167524718, -6.635002232099147, -4.840706384807957, -4.413167412082267, -6.064534734908628, -3.063899010586587, -3.0755793590099243, -6.609516541588117, -3.3900904528581925, -5.717459621278913, -4.747963151238187, -5.509311838115293, -4.546430901778218, -6.179389954620724, -6.326344499974565, -5.702153345566668, -4.697112553635738, -4.307817127690438, -5.306232181842763, -4.6888424726672895, -6.116099946507546, -5.459651715947887, -3.434443858297593, -3.027927355248377, -3.9598318496065086, -3.9336284183578507, -6.164724361210634, -5.1866572534102815, -4.988434421931455, -3.4106670454991024, -5.267104798446782, -4.454298342677626, -5.513140188559842, -6.349988769692197, -4.176749108266341, -4.06241885927677, -5.928197893742187, -4.164944572840207, -5.685906073404755, -4.741524561494865, -5.621053943182366, -3.7275906014333917, -4.912460964591176, -4.722591380631442, -6.836170464036709], :type=>\"scatter\", :mode=>\"lines\"}], @layout={}, @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=\"367ce7b1-69c8-4818-b2df-d15de5d19496\" style=\"height: 100%; width: 100%;\"></div>\n",
|
171
|
+
"\n",
|
172
|
+
"<script>\n",
|
173
|
+
" require(['plotly'], function(Plotly) { \n",
|
174
|
+
"Plotly.newPlot(\n",
|
175
|
+
" '367ce7b1-69c8-4818-b2df-d15de5d19496',\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\":[5.643574849105169,4.961306066758519,4.060934803889124,3.414571515778032,3.197411503903012,3.2278637301592594,4.872105605880176,3.186894287301045,6.410507190686895,3.654375394859363,6.144401812948679,5.192899463415073,5.8904630069303625,4.049320930799653,4.864790426688506,4.816183710450119,6.099187602311419,3.9171455780212807,4.866614613413191,6.697259779947566,3.694022532442527,6.353507144539263,4.904665442566774,3.5897970270002344,4.45139368897716,3.923280428362602,5.281395053251372,4.8419034933281075,4.203666147182073,4.746377891662435,4.361637820104374,5.627462789773117,5.351768666729981,3.094692385328164,6.839030054843362,3.278166743991193,3.830059270315399,6.2024506808018245,6.214265570110114,4.202385347823167,3.8997675180587303,3.5805583787387603,3.7950796359559567,3.171619362136638,5.275605617318684,6.635818464397435,5.4106155598873045,5.076774881525382,3.0837731858523707,3.708524967452129,4.438729561323523,5.067911535349737,4.091430591263282,3.6341389770411716,5.188335596317376,4.236649806919521,4.71829089522835,4.932248853636338,5.126123634687506,3.1039398214544827,6.930884750814518,4.91388661568968,5.379882791817321,6.176476695475962,5.990598138280438,6.291616808752844,5.201026929785126,4.977227740756096,3.198345596621278,4.50300724674422,3.029246325995899,4.014484155725455,3.3953501769715344,6.1901035285059995,4.704259693763614,6.137490821869501,4.902373381687166,4.992645940018968,6.268387227733969,4.634123687345734,4.681321142919827,6.802345377946052,3.3732407151503883,3.99658618737928,3.1025732739847025,6.002190089000578,6.95813133077629,4.0285761714101325,4.902367512489361,6.044006159970719,5.62940680404261,3.8853853027542424,5.590250253235214,4.374223013871178,4.754674417824647,4.606267039693784,3.8201755584054613,4.140672180845154,3.6989351781619533,5.7879841884565035,5.228441158043866],\"type\":\"scatter\",\"mode\":\"markers\"},{\"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.2918470322309492,0.06784672036348016,-0.25527629967714394,0.29401864561379876,-0.08568254608572456,0.17712162743022564,0.26627759005907503,0.020384797819056444,0.28502289639693523,0.08007853199056048,-0.19734214257260274,0.11817015271094344,-0.027903131339155562,0.04553219635709904,0.4055360939507664,-0.45509583087448746,-0.33102521139201024,0.06941561309717514,0.017814885421255422,0.4793591894071675,0.07162445344284951,0.3344137369225737,0.4448499371114156,0.251494553190321,0.3447209883729694,-0.45099499352739925,0.004783736692153151,0.14339717138861385,0.26628704140365667,-0.2629054066581673,-0.4503577922538329,0.08265760555530632,-0.22143991811936414,-0.23580415456704396,0.26322659840296936,-0.128788848929415,-0.4170688408115917,-0.014077203115443027,0.3395412388199053,-0.4850347285370541,0.4960429773944819,0.3040784936087565,0.16948992932608808,0.4077010559984423,-0.3886198372731159,-0.34784790849691916,0.29202365040433176,-0.18168304192783602,-0.0367643830189156,-0.21911865820667176,0.020101721514611315,-0.05111380252546571,0.4949648524115432,-0.24758597930070703,0.01660629531212976,0.016854088964895042,-0.4665684099945626,0.3566923305416577,-0.4092945154102625,-0.13259686509784563,0.45300974197215516,0.45410647894310074,0.45495676434830457,0.15086320701033495,0.2934602634074398,-0.0903957850447864,0.49890589904526295,0.3792028397429186,-0.4721034288623185,0.11137669317514398,0.3985340067747464,0.2508261947952485,-0.0645820819035493,0.35693729492652293,-0.30828956162814736,0.4993844733250866,-0.44435233382164685,-0.043080446873944966,-0.3432782593068676,-0.4240771326034558,0.32542579346206735,0.29953033373629523,0.1687090840705241,0.3555759037032399,-0.21620013268854754,0.07570042984091019,-0.39864335805086437,0.2804345656617052,0.19934148576641586,0.31810414669918974,-0.165606670036899,0.26578729184618066,0.2474034933969026,-0.39983517652623746,-0.4344252880801087,-0.03626036802717547,-0.03005067553304208,0.38095357564818966,0.4139286965201181,-0.3988083478311877,-0.3342289107811315],\"type\":\"scatter\",\"mode\":\"markers+lines\"},{\"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.118541279858697,-4.336928800939507,-3.9385408402956856,-5.13510660947426,-4.375182681191897,-4.266382896354829,-6.693443541975876,-6.068485174327739,-5.434508056276314,-6.348461280217517,-5.905133751421397,-5.213224971463147,-3.5734488291532553,-5.972821323626621,-6.668739355256433,-6.58990218086364,-6.1131559491866465,-5.426205049616756,-4.899390759059109,-5.095936685076762,-6.439631349138296,-3.7398545218636605,-3.250041192105066,-4.158814185998766,-5.418745598349464,-6.242926036175403,-5.973966460366805,-6.312228424139535,-6.520655870249062,-6.865773343104487,-3.3008248597542553,-6.277665827849311,-6.162921326750342,-3.135067725585891,-6.2572485618789875,-6.306895083670741,-5.353938555632384,-3.9295367886096355,-3.6233239677235125,-3.5643818702980914,-5.69180840299496,-5.313294977420196,-6.314156738567251,-3.623851578109708,-5.076276675460165,-5.012832082845858,-5.904876759183978,-6.596270545713277,-5.342939206155604,-6.535379955178368,-4.550847760425438,-5.588014465130651,-4.088429607922308,-3.736465125338768,-3.498656210626582,-5.337687693604439,-4.220374167524718,-6.635002232099147,-4.840706384807957,-4.413167412082267,-6.064534734908628,-3.063899010586587,-3.0755793590099243,-6.609516541588117,-3.3900904528581925,-5.717459621278913,-4.747963151238187,-5.509311838115293,-4.546430901778218,-6.179389954620724,-6.326344499974565,-5.702153345566668,-4.697112553635738,-4.307817127690438,-5.306232181842763,-4.6888424726672895,-6.116099946507546,-5.459651715947887,-3.434443858297593,-3.027927355248377,-3.9598318496065086,-3.9336284183578507,-6.164724361210634,-5.1866572534102815,-4.988434421931455,-3.4106670454991024,-5.267104798446782,-4.454298342677626,-5.513140188559842,-6.349988769692197,-4.176749108266341,-4.06241885927677,-5.928197893742187,-4.164944572840207,-5.685906073404755,-4.741524561494865,-5.621053943182366,-3.7275906014333917,-4.912460964591176,-4.722591380631442,-6.836170464036709],\"type\":\"scatter\",\"mode\":\"lines\"}],\n",
|
177
|
+
" {\"xaxis\":{\"title\":\"x title\"},\"yaxis\":{\"title\":\"y title\"}},\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('367ce7b1-69c8-4818-b2df-d15de5d19496'))\n",
|
183
|
+
"})\n",
|
184
|
+
" }) \n",
|
185
|
+
"</script>"
|
186
|
+
],
|
187
|
+
"text/plain": [
|
188
|
+
"#<Plotly::Offline::HTML:0x007fdb8a025bf8 @id=\"367ce7b1-69c8-4818-b2df-d15de5d19496\", @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=>[5.643574849105169, 4.961306066758519, 4.060934803889124, 3.414571515778032, 3.197411503903012, 3.2278637301592594, 4.872105605880176, 3.186894287301045, 6.410507190686895, 3.654375394859363, 6.144401812948679, 5.192899463415073, 5.8904630069303625, 4.049320930799653, 4.864790426688506, 4.816183710450119, 6.099187602311419, 3.9171455780212807, 4.866614613413191, 6.697259779947566, 3.694022532442527, 6.353507144539263, 4.904665442566774, 3.5897970270002344, 4.45139368897716, 3.923280428362602, 5.281395053251372, 4.8419034933281075, 4.203666147182073, 4.746377891662435, 4.361637820104374, 5.627462789773117, 5.351768666729981, 3.094692385328164, 6.839030054843362, 3.278166743991193, 3.830059270315399, 6.2024506808018245, 6.214265570110114, 4.202385347823167, 3.8997675180587303, 3.5805583787387603, 3.7950796359559567, 3.171619362136638, 5.275605617318684, 6.635818464397435, 5.4106155598873045, 5.076774881525382, 3.0837731858523707, 3.708524967452129, 4.438729561323523, 5.067911535349737, 4.091430591263282, 3.6341389770411716, 5.188335596317376, 4.236649806919521, 4.71829089522835, 4.932248853636338, 5.126123634687506, 3.1039398214544827, 6.930884750814518, 4.91388661568968, 5.379882791817321, 6.176476695475962, 5.990598138280438, 6.291616808752844, 5.201026929785126, 4.977227740756096, 3.198345596621278, 4.50300724674422, 3.029246325995899, 4.014484155725455, 3.3953501769715344, 6.1901035285059995, 4.704259693763614, 6.137490821869501, 4.902373381687166, 4.992645940018968, 6.268387227733969, 4.634123687345734, 4.681321142919827, 6.802345377946052, 3.3732407151503883, 3.99658618737928, 3.1025732739847025, 6.002190089000578, 6.95813133077629, 4.0285761714101325, 4.902367512489361, 6.044006159970719, 5.62940680404261, 3.8853853027542424, 5.590250253235214, 4.374223013871178, 4.754674417824647, 4.606267039693784, 3.8201755584054613, 4.140672180845154, 3.6989351781619533, 5.7879841884565035, 5.228441158043866], :type=>\"scatter\", :mode=>\"markers\"}, {: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.2918470322309492, 0.06784672036348016, -0.25527629967714394, 0.29401864561379876, -0.08568254608572456, 0.17712162743022564, 0.26627759005907503, 0.020384797819056444, 0.28502289639693523, 0.08007853199056048, -0.19734214257260274, 0.11817015271094344, -0.027903131339155562, 0.04553219635709904, 0.4055360939507664, -0.45509583087448746, -0.33102521139201024, 0.06941561309717514, 0.017814885421255422, 0.4793591894071675, 0.07162445344284951, 0.3344137369225737, 0.4448499371114156, 0.251494553190321, 0.3447209883729694, -0.45099499352739925, 0.004783736692153151, 0.14339717138861385, 0.26628704140365667, -0.2629054066581673, -0.4503577922538329, 0.08265760555530632, -0.22143991811936414, -0.23580415456704396, 0.26322659840296936, -0.128788848929415, -0.4170688408115917, -0.014077203115443027, 0.3395412388199053, -0.4850347285370541, 0.4960429773944819, 0.3040784936087565, 0.16948992932608808, 0.4077010559984423, -0.3886198372731159, -0.34784790849691916, 0.29202365040433176, -0.18168304192783602, -0.0367643830189156, -0.21911865820667176, 0.020101721514611315, -0.05111380252546571, 0.4949648524115432, -0.24758597930070703, 0.01660629531212976, 0.016854088964895042, -0.4665684099945626, 0.3566923305416577, -0.4092945154102625, -0.13259686509784563, 0.45300974197215516, 0.45410647894310074, 0.45495676434830457, 0.15086320701033495, 0.2934602634074398, -0.0903957850447864, 0.49890589904526295, 0.3792028397429186, -0.4721034288623185, 0.11137669317514398, 0.3985340067747464, 0.2508261947952485, -0.0645820819035493, 0.35693729492652293, -0.30828956162814736, 0.4993844733250866, -0.44435233382164685, -0.043080446873944966, -0.3432782593068676, -0.4240771326034558, 0.32542579346206735, 0.29953033373629523, 0.1687090840705241, 0.3555759037032399, -0.21620013268854754, 0.07570042984091019, -0.39864335805086437, 0.2804345656617052, 0.19934148576641586, 0.31810414669918974, -0.165606670036899, 0.26578729184618066, 0.2474034933969026, -0.39983517652623746, -0.4344252880801087, -0.03626036802717547, -0.03005067553304208, 0.38095357564818966, 0.4139286965201181, -0.3988083478311877, -0.3342289107811315], :type=>\"scatter\", :mode=>\"markers+lines\"}, {: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.118541279858697, -4.336928800939507, -3.9385408402956856, -5.13510660947426, -4.375182681191897, -4.266382896354829, -6.693443541975876, -6.068485174327739, -5.434508056276314, -6.348461280217517, -5.905133751421397, -5.213224971463147, -3.5734488291532553, -5.972821323626621, -6.668739355256433, -6.58990218086364, -6.1131559491866465, -5.426205049616756, -4.899390759059109, -5.095936685076762, -6.439631349138296, -3.7398545218636605, -3.250041192105066, -4.158814185998766, -5.418745598349464, -6.242926036175403, -5.973966460366805, -6.312228424139535, -6.520655870249062, -6.865773343104487, -3.3008248597542553, -6.277665827849311, -6.162921326750342, -3.135067725585891, -6.2572485618789875, -6.306895083670741, -5.353938555632384, -3.9295367886096355, -3.6233239677235125, -3.5643818702980914, -5.69180840299496, -5.313294977420196, -6.314156738567251, -3.623851578109708, -5.076276675460165, -5.012832082845858, -5.904876759183978, -6.596270545713277, -5.342939206155604, -6.535379955178368, -4.550847760425438, -5.588014465130651, -4.088429607922308, -3.736465125338768, -3.498656210626582, -5.337687693604439, -4.220374167524718, -6.635002232099147, -4.840706384807957, -4.413167412082267, -6.064534734908628, -3.063899010586587, -3.0755793590099243, -6.609516541588117, -3.3900904528581925, -5.717459621278913, -4.747963151238187, -5.509311838115293, -4.546430901778218, -6.179389954620724, -6.326344499974565, -5.702153345566668, -4.697112553635738, -4.307817127690438, -5.306232181842763, -4.6888424726672895, -6.116099946507546, -5.459651715947887, -3.434443858297593, -3.027927355248377, -3.9598318496065086, -3.9336284183578507, -6.164724361210634, -5.1866572534102815, -4.988434421931455, -3.4106670454991024, -5.267104798446782, -4.454298342677626, -5.513140188559842, -6.349988769692197, -4.176749108266341, -4.06241885927677, -5.928197893742187, -4.164944572840207, -5.685906073404755, -4.741524561494865, -5.621053943182366, -3.7275906014333917, -4.912460964591176, -4.722591380631442, -6.836170464036709], :type=>\"scatter\", :mode=>\"lines\"}], @layout={:xaxis=>{:title=>\"x title\"}, :yaxis=>{:title=>\"y title\"}}, @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.layout.xaxis = { title: 'x title' }\n",
|
197
|
+
"plot.layout.yaxis = { title: 'y 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
|
+
}
|