-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
28 lines (26 loc) · 1.21 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<title>Plotting functions in JavaScript using the
function plot library</title>
<meta charset="utf-8"/>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://mauriciopoppe.github.io/function-plot/js/function-plot.js"></script>
<script src="myscript.js"></script>
<link rel="stylesheet" href="mystyle.css"></link>
</head>
<body onload="plot();">
<section id="plotSettings">
<label for="xMin">xMin: </label> value: <input type=number id="xMin" value=0 step=0.5 oninput="plot();">
<label for="xMax">xMax: </label> value: <input type=number id="xMax" value=6.3 step=0.5 oninput="plot();">
<label for="yMin">yMin: </label> value: <input type=number id="yMin" value=-1 step=0.5 oninput="plot();">
<label for="yMax">yMax: </label> value: <input type=number id="yMax" value=1 step=0.5 oninput="plot();">
<label for="color">Color: </label> value: <input type=color id="color" onchange="plot();">
<label for="function">Function:</label> <input type="text" id="function" value="sin(x)" onchange="plot();">
<button onclick="plot();">Plot it!</button>
</section>
<section id="plot">
<div id="myFunction"></div>
</section>
</body>
</html>