votre fonction

x mini Maxi

y mini y Maxi

Dimensionnement du canevas
height
width canvas

épaisseur trait

couleur trait

Votre navigateur ne supporte pas la balise canvas

<!DOCTYPE HTML>
<html lang = "fr">
<head>
	<title>tracer fonction</title>
	<meta charset = "utf-8" />
</head>
<body>
	<canvas id = "schema" height="300" width="300" style="border:1px solid">
   Votre navigateur ne supporte pas la balise canvas
</canvas>
<script>
	var zone_dessin = document.getElementById("schema");
	var graphe= zone_dessin.getContext("2d");
	var compteur=;
	graphe.strokeStyle = "#0098f8";
	graphe.lineWidth=1;
	graphe.beginPath();
		graphe.moveTo(0,f());
		while(compteur<) {
			graphe.lineTo(20*(compteur-()),-(f(compteur)-())*);
			compteur=(compteur+0.05);
		}						
	graphe.stroke();
	function f(x) {
		var y=Math.sin(x);
		return (y);
	}
	</script>
</body>
</html>