Example #1
0
		for ($i = -5; $i < 10; $i++) {
			$s45[$i] = $i;
		}
		// 60 degree line
		for ($i = -5; $i < 10; $i++) {
			$s60[$i] = 2 * $i;
		}
		
		$g->add_series($s45, "Y = X");
		$g->add_series($s60, "Y = 2X");
		print("<a href=\"".$g->createurl()."&debug=1\"><img src=\""
			.$g->createurl()."\" title=\"click to see debug output\"></a><br>");
	}
	
	$eqn = "y = x^2;";
	$g = new Eqn_multigraph(array(
		"title"		=>	"testing equation graph",
		"width"		=>	$gwidth,
		"height"	=>	$gheight,
		"type"		=>	"line",
		"square"	=>	1,
		"x_start"	=>	-5,
		"x_end"		=>	5,
		"eqn"		=>	"y = x^2",
	));
	print("<a href=\"".$g->createurl()."&debug=1\"><img src=\""
		.$g->createurl()."\" title=\"click to see debug output\"></a><br>");
?>
</body>
</html>