To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 30 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
using PlutoUI
193 ms
👀 Reading hidden code
using JSON
103 ms
plot (generic function with 1 method)
👀 Reading hidden code
plot(x, y) = """
<script src="https://cdn.plot.ly/plotly-1.58.0.min.js"></script>

<script id="asdf">
const container = this ?? html`<div style="width: 200px;"></div>`

Plotly.react( container, [{
x: $(JSON.json(x)),
y: $(JSON.json(y)),
}], {

width: 600,
margin: {
t: 0,
l:60,
r:20,
b:60
}
},{staticPlot: true})

return container
</script>
""" |> HTML
529 μs
c3 (generic function with 1 method)
👀 Reading hidden code
c3(x,y) = """

<!-- Load c3.css -->
<link href="https://cdn.jsdelivr.net/npm/c3@0.7.20/c3.min.css" rel="stylesheet">

<!-- Load d3.js and c3.js -->
<script src="/path/to/d3.v5.min.js" charset="utf-8"></script>
<script src="https://cdn.jsdelivr.net/npm/c3@0.7.20/c3.min.js"></script>


<script id="asdf">
const container = this ?? html`<div id="aaa" style="width: 200px;"></div>`
var chart = c3.generate({
bindto: "#aaa",
data: {
columns: [
['data1', 30, 200, 100, 400, 150, 250],
['data2', 50, 20, 10, 40, 15, 25]
]
}
});
return container
</script>

""" |> HTML
430 μs
c3([1,2], [3,3])
👀 Reading hidden code
24.0 μs
1.0:0.1:10000.0
x = 1:.1:10000
👀 Reading hidden code
16.2 μs
y = sin.(x .* z)
👀 Reading hidden code
152 ms
@bind z Slider(0:0.00001:0.1)
👀 Reading hidden code
314 ms
JSON.json(x);
👀 Reading hidden code
239 ms
plot(x,y)
👀 Reading hidden code
97.3 ms
using Plots
👀 Reading hidden code
3.8 s
y2 = sin.(x .* z2)
👀 Reading hidden code
448 μs
@bind z2 Slider(0:0.00001:0.1)
👀 Reading hidden code
727 μs
PlutoUI.as_svg(Plots.plot(x, y2))
👀 Reading hidden code
3.7 s






































👀 Reading hidden code
11.8 μs