Skip to content

Instantly share code, notes, and snippets.

@genkuroki
Last active December 26, 2019 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genkuroki/6b968d6b6c209b8bbca2d2d997a3680a to your computer and use it in GitHub Desktop.
Save genkuroki/6b968d6b6c209b8bbca2d2d997a3680a to your computer and use it in GitHub Desktop.
plotly and plotlyjs
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "using Pkg\nPkg.status(\"Plots\")\nPkg.status(\"Plotly\")\nPkg.status(\"PlotlyJS\")\nPkg.status(\"WebIO\")\nPkg.status(\"ORCA\")",
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"text": "\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `C:\\Users\\genkuroki\\.julia\\environments\\v1.3\\Project.toml`\n \u001b[90m [91a5bcdd]\u001b[39m\u001b[37m Plots v0.28.4\u001b[39m\n\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `C:\\Users\\genkuroki\\.julia\\environments\\v1.3\\Project.toml`\n \u001b[90m [58dd65bb]\u001b[39m\u001b[37m Plotly v0.2.0\u001b[39m\n\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `C:\\Users\\genkuroki\\.julia\\environments\\v1.3\\Project.toml`\n \u001b[90m [f0f68f2c]\u001b[39m\u001b[37m PlotlyJS v0.13.0\u001b[39m\n\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `C:\\Users\\genkuroki\\.julia\\environments\\v1.3\\Project.toml`\n \u001b[90m [0f1e0344]\u001b[39m\u001b[37m WebIO v0.8.13\u001b[39m\n\u001b[32m\u001b[1m Status\u001b[22m\u001b[39m `C:\\Users\\genkuroki\\.julia\\environments\\v1.3\\Project.toml`\n \u001b[90m [47be7bcc]\u001b[39m\u001b[37m ORCA v0.3.1\u001b[39m\n",
"name": "stdout"
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "using Plots",
"execution_count": 2,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "plotly()\nplot(sin)",
"execution_count": 3,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": " <script type=\"text/javascript\">\n requirejs([\"https://cdn.plot.ly/plotly-latest.min.js\"], function(p) {\n window.Plotly = p\n });\n </script>\n"
},
"metadata": {}
},
{
"output_type": "execute_result",
"execution_count": 3,
"data": {
"text/html": "<!DOCTYPE html>\n<html>\n <head>\n <title>Plots.jl</title>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n <script src=\"https://cdn.plot.ly/plotly-latest.min.js\"></script>\n </head>\n <body>\n <div id=\"bb6f518e-1851-484b-9765-fddb969241fb\" style=\"width:600px;height:400px;\"></div>\n <script>\n PLOT = document.getElementById('bb6f518e-1851-484b-9765-fddb969241fb');\n Plotly.plot(PLOT, [\n {\n \"xaxis\": \"x1\",\n \"colorbar\": {\n \"title\": \"\"\n },\n \"yaxis\": \"y1\",\n \"text\": [\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null\n ],\n \"x\": [\n -5.0,\n -4.975585452450529,\n -4.951170904901059,\n -4.926756357351589,\n -4.9023418098021185,\n -4.789467937116388,\n -4.676594064430657,\n -4.563720191744926,\n -4.450846319059195,\n -4.337972446373465,\n -4.225098573687734,\n -4.1122247010020025,\n -3.9993508283162718,\n -3.863685842973144,\n -3.7280208576300167,\n -3.592355872286889,\n -3.456690886943761,\n -3.227284849893052,\n -2.997878812842343,\n -2.7486795562559143,\n -2.499480299669486,\n -2.384610463415544,\n -2.2697406271616023,\n -2.15487079090766,\n -2.0400009546537183,\n -1.916848349974064,\n -1.7936957452944098,\n -1.6705431406147557,\n -1.5473905359351015,\n -1.4047061661049955,\n -1.2620217962748894,\n -1.1193374264447833,\n -0.9766530566146772,\n -0.8498520271834542,\n -0.7230509977522314,\n -0.5962499683210085,\n -0.46944893888978556,\n -0.24706278674379273,\n -0.024676634597799892,\n 0.21778396597769734,\n 0.46024456655319457,\n 0.5821953717969262,\n 0.7041461770406577,\n 0.8260969822843893,\n 0.9480477875281209,\n 1.0828799972071013,\n 1.2177122068860817,\n 1.3525444165650622,\n 1.4873766262440427,\n 1.6156660715451405,\n 1.7439555168462386,\n 1.8722449621473367,\n 2.0005344074484346,\n 2.1339256643647024,\n 2.26731692128097,\n 2.4007081781972377,\n 2.5340994351135055,\n 2.758673485890978,\n 2.983247536668451,\n 3.257426998266046,\n 3.531606459863641,\n 3.6604748502195017,\n 3.789343240575363,\n 3.918211630931224,\n 4.047080021287085,\n 4.150308598646275,\n 4.253537176005464,\n 4.3567657533646535,\n 4.459994330723842,\n 4.563222908083031,\n 4.66645148544222,\n 4.7696800628014095,\n 4.872908640160599,\n 4.904681480120449,\n 4.9364543200802995,\n 4.96822716004015,\n 5.0\n ],\n \"showlegend\": true,\n \"mode\": \"lines\",\n \"name\": \"y1\",\n \"zmin\": null,\n \"legendgroup\": \"y1\",\n \"zmax\": null,\n \"line\": {\n \"color\": \"rgba(0, 154, 250, 1.000)\",\n \"shape\": \"linear\",\n \"dash\": \"solid\",\n \"width\": 1\n },\n \"y\": [\n 0.9589242746631385,\n 0.965563291722537,\n 0.97162679393126,\n 0.9771111671962716,\n 0.9820131426088557,\n 0.9970308876503605,\n 0.9993594303958425,\n 0.9889691355046937,\n 0.9659922401577499,\n 0.9307211710759917,\n 0.8836048228085437,\n 0.8252428446561658,\n 0.7563780089405031,\n 0.6609568980656421,\n 0.5533895297159968,\n 0.4356526454244615,\n 0.30990986964986167,\n 0.08558735965787978,\n -0.14321964837503193,\n -0.3828811482645716,\n -0.5988884178668034,\n -0.6867308941333826,\n -0.7655218613254127,\n -0.8342228090735139,\n -0.8919282192813187,\n -0.9407191411596759,\n -0.9752606092104765,\n -0.9950294098276709,\n -0.9997260969818377,\n -0.986238707792793,\n -0.9527066947452159,\n -0.899811572956539,\n -0.8286283994203965,\n -0.751182737350679,\n -0.6616753570350854,\n -0.5615434757426131,\n -0.4523949080295961,\n -0.24455699373377002,\n -0.02467413025764248,\n 0.2160664670593724,\n 0.444167238157247,\n 0.5498589611843256,\n 0.6473833119728851,\n 0.7352917051011392,\n 0.8122783865116799,\n 0.8833115717351019,\n 0.9383107090121471,\n 0.9762774430259284,\n 0.9965225940430157,\n 0.9989935218813863,\n 0.9850453703032711,\n 0.9549073858487706,\n 0.9090749050234505,\n 0.8455887043238225,\n 0.7670790476493855,\n 0.6749408050647633,\n 0.5708109838099867,\n 0.37362981296428177,\n 0.15768424347650672,\n -0.11557548200784744,\n -0.3802011846346912,\n -0.4959097764199482,\n -0.6033941549108707,\n -0.7008717892993345,\n -0.7867261015407899,\n -0.8461482082902942,\n -0.8965616460290249,\n -0.9374296790293236,\n -0.9683171984310474,\n -0.988895354706268,\n -0.9989450588148868,\n -0.998359314775486,\n -0.9871443588172798,\n -0.981568696042158,\n -0.9750022099138186,\n -0.9674515288300809,\n -0.9589242746631385\n ],\n \"type\": \"scatter\",\n \"hoverinfo\": \"text\"\n }\n]\n, {\n \"showlegend\": true,\n \"xaxis\": {\n \"showticklabels\": true,\n \"gridwidth\": 0.5,\n \"tickvals\": [\n -4.0,\n -2.0,\n 0.0,\n 2.0,\n 4.0\n ],\n \"visible\": true,\n \"ticks\": \"inside\",\n \"range\": [\n -5.3,\n 5.3\n ],\n \"domain\": [\n 0.0658209390492855,\n 0.9934383202099738\n ],\n \"tickmode\": \"array\",\n \"linecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"showgrid\": true,\n \"title\": \"\",\n \"mirror\": false,\n \"tickangle\": 0,\n \"showline\": true,\n \"gridcolor\": \"rgba(0, 0, 0, 0.100)\",\n \"titlefont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 15\n },\n \"tickcolor\": \"rgb(0, 0, 0)\",\n \"ticktext\": [\n \"-4\",\n \"-2\",\n \"0\",\n \"2\",\n \"4\"\n ],\n \"zeroline\": false,\n \"type\": \"-\",\n \"tickfont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"zerolinecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"anchor\": \"y1\"\n },\n \"paper_bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"annotations\": [],\n \"height\": 400,\n \"margin\": {\n \"l\": 0,\n \"b\": 20,\n \"r\": 0,\n \"t\": 20\n },\n \"plot_bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"yaxis\": {\n \"showticklabels\": true,\n \"gridwidth\": 0.5,\n \"tickvals\": [\n -1.0,\n -0.5,\n 0.0,\n 0.5,\n 1.0\n ],\n \"visible\": true,\n \"ticks\": \"inside\",\n \"range\": [\n -1.0596986628031682,\n 1.059331996217173\n ],\n \"domain\": [\n 0.03762029746281716,\n 0.9901574803149606\n ],\n \"tickmode\": \"array\",\n \"linecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"showgrid\": true,\n \"title\": \"\",\n \"mirror\": false,\n \"tickangle\": 0,\n \"showline\": true,\n \"gridcolor\": \"rgba(0, 0, 0, 0.100)\",\n \"titlefont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 15\n },\n \"tickcolor\": \"rgb(0, 0, 0)\",\n \"ticktext\": [\n \"-1.0\",\n \"-0.5\",\n \"0.0\",\n \"0.5\",\n \"1.0\"\n ],\n \"zeroline\": false,\n \"type\": \"-\",\n \"tickfont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"zerolinecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"anchor\": \"x1\"\n },\n \"legend\": {\n \"tracegroupgap\": 0,\n \"bordercolor\": \"rgba(0, 0, 0, 1.000)\",\n \"bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"font\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"y\": 1.0,\n \"x\": 1.0\n },\n \"width\": 600\n}\n);\n </script>\n\n </body>\n</html>\n",
"application/vnd.plotly.v1+json": {
"layout": {
"showlegend": true,
"xaxis": {
"showticklabels": true,
"gridwidth": 0.5,
"tickvals": [
-4,
-2,
0,
2,
4
],
"visible": true,
"ticks": "inside",
"range": [
-5.3,
5.3
],
"domain": [
0.0658209390492855,
0.9934383202099738
],
"tickmode": "array",
"linecolor": "rgba(0, 0, 0, 1.000)",
"showgrid": true,
"title": "",
"mirror": false,
"tickangle": 0,
"showline": true,
"gridcolor": "rgba(0, 0, 0, 0.100)",
"titlefont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 15
},
"tickcolor": "rgb(0, 0, 0)",
"ticktext": [
"-4",
"-2",
"0",
"2",
"4"
],
"zeroline": false,
"type": "-",
"tickfont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"zerolinecolor": "rgba(0, 0, 0, 1.000)",
"anchor": "y1"
},
"paper_bgcolor": "rgba(255, 255, 255, 1.000)",
"annotations": [],
"height": 400,
"margin": {
"l": 0,
"b": 20,
"r": 0,
"t": 20
},
"plot_bgcolor": "rgba(255, 255, 255, 1.000)",
"yaxis": {
"showticklabels": true,
"gridwidth": 0.5,
"tickvals": [
-1,
-0.5,
0,
0.5,
1
],
"visible": true,
"ticks": "inside",
"range": [
-1.0596986628031682,
1.059331996217173
],
"domain": [
0.03762029746281716,
0.9901574803149606
],
"tickmode": "array",
"linecolor": "rgba(0, 0, 0, 1.000)",
"showgrid": true,
"title": "",
"mirror": false,
"tickangle": 0,
"showline": true,
"gridcolor": "rgba(0, 0, 0, 0.100)",
"titlefont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 15
},
"tickcolor": "rgb(0, 0, 0)",
"ticktext": [
"-1.0",
"-0.5",
"0.0",
"0.5",
"1.0"
],
"zeroline": false,
"type": "-",
"tickfont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"zerolinecolor": "rgba(0, 0, 0, 1.000)",
"anchor": "x1"
},
"legend": {
"tracegroupgap": 0,
"bordercolor": "rgba(0, 0, 0, 1.000)",
"bgcolor": "rgba(255, 255, 255, 1.000)",
"font": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"y": 1,
"x": 1
},
"width": 600
},
"data": [
{
"xaxis": "x1",
"colorbar": {
"title": ""
},
"yaxis": "y1",
"text": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"x": [
-5,
-4.975585452450529,
-4.951170904901059,
-4.926756357351589,
-4.9023418098021185,
-4.789467937116388,
-4.676594064430657,
-4.563720191744926,
-4.450846319059195,
-4.337972446373465,
-4.225098573687734,
-4.1122247010020025,
-3.9993508283162718,
-3.863685842973144,
-3.7280208576300167,
-3.592355872286889,
-3.456690886943761,
-3.227284849893052,
-2.997878812842343,
-2.7486795562559143,
-2.499480299669486,
-2.384610463415544,
-2.2697406271616023,
-2.15487079090766,
-2.0400009546537183,
-1.916848349974064,
-1.7936957452944098,
-1.6705431406147557,
-1.5473905359351015,
-1.4047061661049955,
-1.2620217962748894,
-1.1193374264447833,
-0.9766530566146772,
-0.8498520271834542,
-0.7230509977522314,
-0.5962499683210085,
-0.46944893888978556,
-0.24706278674379273,
-0.024676634597799892,
0.21778396597769734,
0.46024456655319457,
0.5821953717969262,
0.7041461770406577,
0.8260969822843893,
0.9480477875281209,
1.0828799972071013,
1.2177122068860817,
1.3525444165650622,
1.4873766262440427,
1.6156660715451405,
1.7439555168462386,
1.8722449621473367,
2.0005344074484346,
2.1339256643647024,
2.26731692128097,
2.4007081781972377,
2.5340994351135055,
2.758673485890978,
2.983247536668451,
3.257426998266046,
3.531606459863641,
3.6604748502195017,
3.789343240575363,
3.918211630931224,
4.047080021287085,
4.150308598646275,
4.253537176005464,
4.3567657533646535,
4.459994330723842,
4.563222908083031,
4.66645148544222,
4.7696800628014095,
4.872908640160599,
4.904681480120449,
4.9364543200802995,
4.96822716004015,
5
],
"showlegend": true,
"mode": "lines",
"name": "y1",
"zmin": null,
"legendgroup": "y1",
"zmax": null,
"line": {
"color": "rgba(0, 154, 250, 1.000)",
"shape": "linear",
"dash": "solid",
"width": 1
},
"y": [
0.9589242746631385,
0.965563291722537,
0.97162679393126,
0.9771111671962716,
0.9820131426088557,
0.9970308876503605,
0.9993594303958425,
0.9889691355046937,
0.9659922401577499,
0.9307211710759917,
0.8836048228085437,
0.8252428446561658,
0.7563780089405031,
0.6609568980656421,
0.5533895297159968,
0.4356526454244615,
0.30990986964986167,
0.08558735965787978,
-0.14321964837503193,
-0.3828811482645716,
-0.5988884178668034,
-0.6867308941333826,
-0.7655218613254127,
-0.8342228090735139,
-0.8919282192813187,
-0.9407191411596759,
-0.9752606092104765,
-0.9950294098276709,
-0.9997260969818377,
-0.986238707792793,
-0.9527066947452159,
-0.899811572956539,
-0.8286283994203965,
-0.751182737350679,
-0.6616753570350854,
-0.5615434757426131,
-0.4523949080295961,
-0.24455699373377002,
-0.02467413025764248,
0.2160664670593724,
0.444167238157247,
0.5498589611843256,
0.6473833119728851,
0.7352917051011392,
0.8122783865116799,
0.8833115717351019,
0.9383107090121471,
0.9762774430259284,
0.9965225940430157,
0.9989935218813863,
0.9850453703032711,
0.9549073858487706,
0.9090749050234505,
0.8455887043238225,
0.7670790476493855,
0.6749408050647633,
0.5708109838099867,
0.37362981296428177,
0.15768424347650672,
-0.11557548200784744,
-0.3802011846346912,
-0.4959097764199482,
-0.6033941549108707,
-0.7008717892993345,
-0.7867261015407899,
-0.8461482082902942,
-0.8965616460290249,
-0.9374296790293236,
-0.9683171984310474,
-0.988895354706268,
-0.9989450588148868,
-0.998359314775486,
-0.9871443588172798,
-0.981568696042158,
-0.9750022099138186,
-0.9674515288300809,
-0.9589242746631385
],
"type": "scatter",
"hoverinfo": "text"
}
]
}
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "plotlyjs()\nplot(sin)",
"execution_count": 4,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "HTML{String}(\"<script>\\n// Immediately-invoked-function-expression to avoid global variables.\\n(function() {\\n var warning_div = document.getElementById(\\\"webio-warning-5884857012167389192\\\");\\n var hide = function () {\\n var script = document.getElementById(\\\"webio-setup-9480050566692782883\\\");\\n var parent = script && script.parentElement;\\n var grandparent = parent && parent.parentElement;\\n if (grandparent) {\\n grandparent.style.display = \\\"none\\\";\\n }\\n warning_div.style.display = \\\"none\\\";\\n };\\n if (typeof Jupyter !== \\\"undefined\\\") {\\n console.log(\\\"WebIO detected Jupyter notebook environment.\\\");\\n // Jupyter notebook.\\n var extensions = (\\n Jupyter\\n && Jupyter.notebook.config.data\\n && Jupyter.notebook.config.data.load_extensions\\n );\\n if (extensions && extensions[\\\"webio-jupyter-notebook\\\"]) {\\n // Extension already loaded.\\n console.log(\\\"Jupyter WebIO nbextension detected; not loading ad-hoc.\\\");\\n hide();\\n return;\\n }\\n } else if (window.location.pathname.includes(\\\"/lab\\\")) {\\n // Guessing JupyterLa\\n console.log(\\\"Jupyter Lab detected; make sure the @webio/jupyter-lab-provider labextension is installed.\\\");\\n hide();\\n return;\\n }\\n})();\\n\\n</script>\\n<p\\n id=\\\"webio-warning-5884857012167389192\\\"\\n class=\\\"output_text output_stderr\\\"\\n style=\\\"padding: 1em; font-weight: bold;\\\"\\n>\\n Unable to load WebIO. Please make sure WebIO works for your Jupyter client.\\n For troubleshooting, please see <a href=\\\"https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/\\\">\\n the WebIO/IJulia documentation</a>.\\n <!-- TODO: link to installation docs. -->\\n</p>\\n\")",
"text/html": "<script>\n// Immediately-invoked-function-expression to avoid global variables.\n(function() {\n var warning_div = document.getElementById(\"webio-warning-5884857012167389192\");\n var hide = function () {\n var script = document.getElementById(\"webio-setup-9480050566692782883\");\n var parent = script && script.parentElement;\n var grandparent = parent && parent.parentElement;\n if (grandparent) {\n grandparent.style.display = \"none\";\n }\n warning_div.style.display = \"none\";\n };\n if (typeof Jupyter !== \"undefined\") {\n console.log(\"WebIO detected Jupyter notebook environment.\");\n // Jupyter notebook.\n var extensions = (\n Jupyter\n && Jupyter.notebook.config.data\n && Jupyter.notebook.config.data.load_extensions\n );\n if (extensions && extensions[\"webio-jupyter-notebook\"]) {\n // Extension already loaded.\n console.log(\"Jupyter WebIO nbextension detected; not loading ad-hoc.\");\n hide();\n return;\n }\n } else if (window.location.pathname.includes(\"/lab\")) {\n // Guessing JupyterLa\n console.log(\"Jupyter Lab detected; make sure the @webio/jupyter-lab-provider labextension is installed.\");\n hide();\n return;\n }\n})();\n\n</script>\n<p\n id=\"webio-warning-5884857012167389192\"\n class=\"output_text output_stderr\"\n style=\"padding: 1em; font-weight: bold;\"\n>\n Unable to load WebIO. Please make sure WebIO works for your Jupyter client.\n For troubleshooting, please see <a href=\"https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/\">\n the WebIO/IJulia documentation</a>.\n <!-- TODO: link to installation docs. -->\n</p>\n"
},
"metadata": {}
},
{
"output_type": "execute_result",
"execution_count": 4,
"data": {
"text/html": "<!DOCTYPE html>\n<html>\n <head>\n <title>Plots.jl</title>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n <script src=\"https://cdn.plot.ly/plotly-latest.min.js\"></script>\n </head>\n <body>\n <div id=\"dd87d63a-045c-4704-8528-49353280b329\" style=\"width:600px;height:400px;\"></div>\n <script>\n PLOT = document.getElementById('dd87d63a-045c-4704-8528-49353280b329');\n Plotly.plot(PLOT, [\n {\n \"xaxis\": \"x1\",\n \"colorbar\": {\n \"title\": \"\"\n },\n \"yaxis\": \"y1\",\n \"text\": [\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null,\n null\n ],\n \"x\": [\n -5.0,\n -4.975585452450529,\n -4.951170904901059,\n -4.926756357351589,\n -4.9023418098021185,\n -4.789467937116388,\n -4.676594064430657,\n -4.563720191744926,\n -4.450846319059195,\n -4.337972446373465,\n -4.225098573687734,\n -4.1122247010020025,\n -3.9993508283162718,\n -3.863685842973144,\n -3.7280208576300167,\n -3.592355872286889,\n -3.456690886943761,\n -3.227284849893052,\n -2.997878812842343,\n -2.7486795562559143,\n -2.499480299669486,\n -2.384610463415544,\n -2.2697406271616023,\n -2.15487079090766,\n -2.0400009546537183,\n -1.916848349974064,\n -1.7936957452944098,\n -1.6705431406147557,\n -1.5473905359351015,\n -1.4047061661049955,\n -1.2620217962748894,\n -1.1193374264447833,\n -0.9766530566146772,\n -0.8498520271834542,\n -0.7230509977522314,\n -0.5962499683210085,\n -0.46944893888978556,\n -0.24706278674379273,\n -0.024676634597799892,\n 0.21778396597769734,\n 0.46024456655319457,\n 0.5821953717969262,\n 0.7041461770406577,\n 0.8260969822843893,\n 0.9480477875281209,\n 1.0828799972071013,\n 1.2177122068860817,\n 1.3525444165650622,\n 1.4873766262440427,\n 1.6156660715451405,\n 1.7439555168462386,\n 1.8722449621473367,\n 2.0005344074484346,\n 2.1339256643647024,\n 2.26731692128097,\n 2.4007081781972377,\n 2.5340994351135055,\n 2.758673485890978,\n 2.983247536668451,\n 3.257426998266046,\n 3.531606459863641,\n 3.6604748502195017,\n 3.789343240575363,\n 3.918211630931224,\n 4.047080021287085,\n 4.150308598646275,\n 4.253537176005464,\n 4.3567657533646535,\n 4.459994330723842,\n 4.563222908083031,\n 4.66645148544222,\n 4.7696800628014095,\n 4.872908640160599,\n 4.904681480120449,\n 4.9364543200802995,\n 4.96822716004015,\n 5.0\n ],\n \"showlegend\": true,\n \"mode\": \"lines\",\n \"name\": \"y1\",\n \"zmin\": null,\n \"legendgroup\": \"y1\",\n \"zmax\": null,\n \"line\": {\n \"color\": \"rgba(0, 154, 250, 1.000)\",\n \"shape\": \"linear\",\n \"dash\": \"solid\",\n \"width\": 1\n },\n \"y\": [\n 0.9589242746631385,\n 0.965563291722537,\n 0.97162679393126,\n 0.9771111671962716,\n 0.9820131426088557,\n 0.9970308876503605,\n 0.9993594303958425,\n 0.9889691355046937,\n 0.9659922401577499,\n 0.9307211710759917,\n 0.8836048228085437,\n 0.8252428446561658,\n 0.7563780089405031,\n 0.6609568980656421,\n 0.5533895297159968,\n 0.4356526454244615,\n 0.30990986964986167,\n 0.08558735965787978,\n -0.14321964837503193,\n -0.3828811482645716,\n -0.5988884178668034,\n -0.6867308941333826,\n -0.7655218613254127,\n -0.8342228090735139,\n -0.8919282192813187,\n -0.9407191411596759,\n -0.9752606092104765,\n -0.9950294098276709,\n -0.9997260969818377,\n -0.986238707792793,\n -0.9527066947452159,\n -0.899811572956539,\n -0.8286283994203965,\n -0.751182737350679,\n -0.6616753570350854,\n -0.5615434757426131,\n -0.4523949080295961,\n -0.24455699373377002,\n -0.02467413025764248,\n 0.2160664670593724,\n 0.444167238157247,\n 0.5498589611843256,\n 0.6473833119728851,\n 0.7352917051011392,\n 0.8122783865116799,\n 0.8833115717351019,\n 0.9383107090121471,\n 0.9762774430259284,\n 0.9965225940430157,\n 0.9989935218813863,\n 0.9850453703032711,\n 0.9549073858487706,\n 0.9090749050234505,\n 0.8455887043238225,\n 0.7670790476493855,\n 0.6749408050647633,\n 0.5708109838099867,\n 0.37362981296428177,\n 0.15768424347650672,\n -0.11557548200784744,\n -0.3802011846346912,\n -0.4959097764199482,\n -0.6033941549108707,\n -0.7008717892993345,\n -0.7867261015407899,\n -0.8461482082902942,\n -0.8965616460290249,\n -0.9374296790293236,\n -0.9683171984310474,\n -0.988895354706268,\n -0.9989450588148868,\n -0.998359314775486,\n -0.9871443588172798,\n -0.981568696042158,\n -0.9750022099138186,\n -0.9674515288300809,\n -0.9589242746631385\n ],\n \"type\": \"scatter\",\n \"hoverinfo\": \"text\"\n }\n]\n, {\n \"showlegend\": true,\n \"xaxis\": {\n \"showticklabels\": true,\n \"gridwidth\": 0.5,\n \"tickvals\": [\n -4.0,\n -2.0,\n 0.0,\n 2.0,\n 4.0\n ],\n \"visible\": true,\n \"ticks\": \"inside\",\n \"range\": [\n -5.3,\n 5.3\n ],\n \"domain\": [\n 0.0658209390492855,\n 0.9934383202099738\n ],\n \"tickmode\": \"array\",\n \"linecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"showgrid\": true,\n \"title\": \"\",\n \"mirror\": false,\n \"tickangle\": 0,\n \"showline\": true,\n \"gridcolor\": \"rgba(0, 0, 0, 0.100)\",\n \"titlefont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 15\n },\n \"tickcolor\": \"rgb(0, 0, 0)\",\n \"ticktext\": [\n \"-4\",\n \"-2\",\n \"0\",\n \"2\",\n \"4\"\n ],\n \"zeroline\": false,\n \"type\": \"-\",\n \"tickfont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"zerolinecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"anchor\": \"y1\"\n },\n \"paper_bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"annotations\": [],\n \"height\": 400,\n \"margin\": {\n \"l\": 0,\n \"b\": 20,\n \"r\": 0,\n \"t\": 20\n },\n \"plot_bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"yaxis\": {\n \"showticklabels\": true,\n \"gridwidth\": 0.5,\n \"tickvals\": [\n -1.0,\n -0.5,\n 0.0,\n 0.5,\n 1.0\n ],\n \"visible\": true,\n \"ticks\": \"inside\",\n \"range\": [\n -1.0596986628031682,\n 1.059331996217173\n ],\n \"domain\": [\n 0.03762029746281716,\n 0.9901574803149606\n ],\n \"tickmode\": \"array\",\n \"linecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"showgrid\": true,\n \"title\": \"\",\n \"mirror\": false,\n \"tickangle\": 0,\n \"showline\": true,\n \"gridcolor\": \"rgba(0, 0, 0, 0.100)\",\n \"titlefont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 15\n },\n \"tickcolor\": \"rgb(0, 0, 0)\",\n \"ticktext\": [\n \"-1.0\",\n \"-0.5\",\n \"0.0\",\n \"0.5\",\n \"1.0\"\n ],\n \"zeroline\": false,\n \"type\": \"-\",\n \"tickfont\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"zerolinecolor\": \"rgba(0, 0, 0, 1.000)\",\n \"anchor\": \"x1\"\n },\n \"legend\": {\n \"tracegroupgap\": 0,\n \"bordercolor\": \"rgba(0, 0, 0, 1.000)\",\n \"bgcolor\": \"rgba(255, 255, 255, 1.000)\",\n \"font\": {\n \"color\": \"rgba(0, 0, 0, 1.000)\",\n \"family\": \"sans-serif\",\n \"size\": 11\n },\n \"y\": 1.0,\n \"x\": 1.0\n },\n \"width\": 600\n}\n);\n </script>\n\n </body>\n</html>\n",
"application/vnd.plotly.v1+json": {
"layout": {
"showlegend": true,
"xaxis": {
"showticklabels": true,
"gridwidth": 0.5,
"tickvals": [
-4,
-2,
0,
2,
4
],
"visible": true,
"ticks": "inside",
"range": [
-5.3,
5.3
],
"domain": [
0.0658209390492855,
0.9934383202099738
],
"tickmode": "array",
"linecolor": "rgba(0, 0, 0, 1.000)",
"showgrid": true,
"title": "",
"mirror": false,
"tickangle": 0,
"showline": true,
"gridcolor": "rgba(0, 0, 0, 0.100)",
"titlefont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 15
},
"tickcolor": "rgb(0, 0, 0)",
"ticktext": [
"-4",
"-2",
"0",
"2",
"4"
],
"zeroline": false,
"type": "-",
"tickfont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"zerolinecolor": "rgba(0, 0, 0, 1.000)",
"anchor": "y1"
},
"paper_bgcolor": "rgba(255, 255, 255, 1.000)",
"annotations": [],
"height": 400,
"margin": {
"l": 0,
"b": 20,
"r": 0,
"t": 20
},
"plot_bgcolor": "rgba(255, 255, 255, 1.000)",
"yaxis": {
"showticklabels": true,
"gridwidth": 0.5,
"tickvals": [
-1,
-0.5,
0,
0.5,
1
],
"visible": true,
"ticks": "inside",
"range": [
-1.0596986628031682,
1.059331996217173
],
"domain": [
0.03762029746281716,
0.9901574803149606
],
"tickmode": "array",
"linecolor": "rgba(0, 0, 0, 1.000)",
"showgrid": true,
"title": "",
"mirror": false,
"tickangle": 0,
"showline": true,
"gridcolor": "rgba(0, 0, 0, 0.100)",
"titlefont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 15
},
"tickcolor": "rgb(0, 0, 0)",
"ticktext": [
"-1.0",
"-0.5",
"0.0",
"0.5",
"1.0"
],
"zeroline": false,
"type": "-",
"tickfont": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"zerolinecolor": "rgba(0, 0, 0, 1.000)",
"anchor": "x1"
},
"legend": {
"tracegroupgap": 0,
"bordercolor": "rgba(0, 0, 0, 1.000)",
"bgcolor": "rgba(255, 255, 255, 1.000)",
"font": {
"color": "rgba(0, 0, 0, 1.000)",
"family": "sans-serif",
"size": 11
},
"y": 1,
"x": 1
},
"width": 600
},
"data": [
{
"xaxis": "x1",
"colorbar": {
"title": ""
},
"yaxis": "y1",
"text": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"x": [
-5,
-4.975585452450529,
-4.951170904901059,
-4.926756357351589,
-4.9023418098021185,
-4.789467937116388,
-4.676594064430657,
-4.563720191744926,
-4.450846319059195,
-4.337972446373465,
-4.225098573687734,
-4.1122247010020025,
-3.9993508283162718,
-3.863685842973144,
-3.7280208576300167,
-3.592355872286889,
-3.456690886943761,
-3.227284849893052,
-2.997878812842343,
-2.7486795562559143,
-2.499480299669486,
-2.384610463415544,
-2.2697406271616023,
-2.15487079090766,
-2.0400009546537183,
-1.916848349974064,
-1.7936957452944098,
-1.6705431406147557,
-1.5473905359351015,
-1.4047061661049955,
-1.2620217962748894,
-1.1193374264447833,
-0.9766530566146772,
-0.8498520271834542,
-0.7230509977522314,
-0.5962499683210085,
-0.46944893888978556,
-0.24706278674379273,
-0.024676634597799892,
0.21778396597769734,
0.46024456655319457,
0.5821953717969262,
0.7041461770406577,
0.8260969822843893,
0.9480477875281209,
1.0828799972071013,
1.2177122068860817,
1.3525444165650622,
1.4873766262440427,
1.6156660715451405,
1.7439555168462386,
1.8722449621473367,
2.0005344074484346,
2.1339256643647024,
2.26731692128097,
2.4007081781972377,
2.5340994351135055,
2.758673485890978,
2.983247536668451,
3.257426998266046,
3.531606459863641,
3.6604748502195017,
3.789343240575363,
3.918211630931224,
4.047080021287085,
4.150308598646275,
4.253537176005464,
4.3567657533646535,
4.459994330723842,
4.563222908083031,
4.66645148544222,
4.7696800628014095,
4.872908640160599,
4.904681480120449,
4.9364543200802995,
4.96822716004015,
5
],
"showlegend": true,
"mode": "lines",
"name": "y1",
"zmin": null,
"legendgroup": "y1",
"zmax": null,
"line": {
"color": "rgba(0, 154, 250, 1.000)",
"shape": "linear",
"dash": "solid",
"width": 1
},
"y": [
0.9589242746631385,
0.965563291722537,
0.97162679393126,
0.9771111671962716,
0.9820131426088557,
0.9970308876503605,
0.9993594303958425,
0.9889691355046937,
0.9659922401577499,
0.9307211710759917,
0.8836048228085437,
0.8252428446561658,
0.7563780089405031,
0.6609568980656421,
0.5533895297159968,
0.4356526454244615,
0.30990986964986167,
0.08558735965787978,
-0.14321964837503193,
-0.3828811482645716,
-0.5988884178668034,
-0.6867308941333826,
-0.7655218613254127,
-0.8342228090735139,
-0.8919282192813187,
-0.9407191411596759,
-0.9752606092104765,
-0.9950294098276709,
-0.9997260969818377,
-0.986238707792793,
-0.9527066947452159,
-0.899811572956539,
-0.8286283994203965,
-0.751182737350679,
-0.6616753570350854,
-0.5615434757426131,
-0.4523949080295961,
-0.24455699373377002,
-0.02467413025764248,
0.2160664670593724,
0.444167238157247,
0.5498589611843256,
0.6473833119728851,
0.7352917051011392,
0.8122783865116799,
0.8833115717351019,
0.9383107090121471,
0.9762774430259284,
0.9965225940430157,
0.9989935218813863,
0.9850453703032711,
0.9549073858487706,
0.9090749050234505,
0.8455887043238225,
0.7670790476493855,
0.6749408050647633,
0.5708109838099867,
0.37362981296428177,
0.15768424347650672,
-0.11557548200784744,
-0.3802011846346912,
-0.4959097764199482,
-0.6033941549108707,
-0.7008717892993345,
-0.7867261015407899,
-0.8461482082902942,
-0.8965616460290249,
-0.9374296790293236,
-0.9683171984310474,
-0.988895354706268,
-0.9989450588148868,
-0.998359314775486,
-0.9871443588172798,
-0.981568696042158,
-0.9750022099138186,
-0.9674515288300809,
-0.9589242746631385
],
"type": "scatter",
"hoverinfo": "text"
}
]
}
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "",
"execution_count": null,
"outputs": []
}
],
"metadata": {
"@webio": {
"lastKernelId": null,
"lastCommId": null
},
"_draft": {
"nbviewer_url": "https://gist.github.com/6b968d6b6c209b8bbca2d2d997a3680a"
},
"gist": {
"id": "6b968d6b6c209b8bbca2d2d997a3680a",
"data": {
"description": "plotly and plotlyjs",
"public": true
}
},
"kernelspec": {
"name": "julia-1.3",
"display_name": "Julia 1.3.0",
"language": "julia"
},
"language_info": {
"file_extension": ".jl",
"name": "julia",
"mimetype": "application/julia",
"version": "1.3.0"
},
"toc": {
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"base_numbering": 1,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment