-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirst_html.html
49 lines (41 loc) · 1.91 KB
/
first_html.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<title>Plotting functions in JavaScript using function plot library.</title>
<meta_charset = "utf-8"/>
<link rel="stylesheet" href="/css/style.css">
<script type="text/javascript" src="/js/script.js"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://mauriciopoppe.github.io/function-plot/js/function-plot.js"></script>
</head>
<body onload="plot();">
<h2> Interactive function plotter</h2>
<section id="plotSettings">
<label for="xMin">xMin: </label>
value: <input type=number id="xMin" value=0 step=0.5 oninput="plot();">
<p></p>
<label for="xMax">xMax: </label>
value: <input type=number id="xMax" value=3 step=0.5 oninput="plot();">
<p></p>
<label for="yMin">yMin: </label>
value: <input type=number id="yMin" value=-1 step=0.5 oninput="plot();">
<p></p>
<label for="yMax">yMax: </label>
value: <input type=number id="yMax" value=1 step=0.5 oninput="plot();">
<p></p>
<label for="color">Color: </label>
value: <input type=color id="color" onchange="plot();">
<p></p>
<label for="function">Function to plot: </label>
value: <input id="function" type=text value="sin(x)" onchange="plot();">
<p></p>
<button onclick="plot();">Plot it!</button>
<p></p>
<button onclick="reset();">Reset graph to defaults</button>
<p></p>
</section>
<section id="plot">
<div id="myFunction"></div>
</section>
</body>
</html>