Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/shared/Graph/examples/plot_2.php
<?php

	include("../Plot.php");

	$plot = new Plot(800,250,"Example Plot");

	$plot->set_data( array (
		"1900" => 81,
		"1901" => 244,
		"1902" => 103,
		"1903" => 251,
		"1904" => 126,
		"1905" => 33,
		"1906" => 213,
		"1907" => 299,
		"1908" => 91,
		"1909" => 263,
		"1910" => 97,
		"1911" => 249,
		"1912" => 40,
		"1913" => 115,
		"1914" => 185,
		"1915" => 55,
		"1916" => 78,
		"1917" => 68,
		"1918" => 76,
		"1919" => 76,
		"1920" => 103,
		"1921" => 19,
		"1922" => 99,
		"1923" => 88,
		"1924" => 93,
		"1925" => 133,
		"1926" => 104,
		"1927" => 231,
		"1928" => 142,
		"1929" => 275,
		"1930" => 268,
		"1931" => 186,
		"1932" => 120,
		"1933" => 83,
		"1934" => 101,
		"1935" => 225,
		"1936" => 61,
		"1937" => 40,
		"1938" => 76,
		"1939" => 121,
		"1940" => 28,
		"1941" => 120,
		"1942" => 195,
		"1943" => 44,
		"1944" => 188,
		"1945" => 132,
		"1946" => 272,
		"1947" => 244,
		"1948" => 216,
		"1949" => 159,
		"1950" => 163,
		"1951" => 254,
		"1952" => 240,
		"1953" => 75,
		"1954" => 262,
		"1955" => 280,
		"1956" => 2,
		"1957" => 259,
		"1958" => 285,
		"1959" => 105,
		"1960" => 288,
		"1961" => 171,
		"1962" => 163,
		"1963" => 222,
		"1964" => 65,
		"1965" => 162,
		"1966" => 163,
		"1967" => 141,
		"1968" => 201,
		"1969" => 206,
		"1970" => 187,
		"1971" => 13,
		"1972" => 122,
		"1973" => 254,
		"1974" => 200,
		"1975" => 291,
		"1976" => 103,
		"1977" => 191,
		"1978" => 173,
		"1979" => 37,
		"1980" => 22,
		"1981" => 56,
		"1982" => 281,
		"1983" => 230,
		"1984" => 76,
		"1985" => 87,
		"1986" => 14,
		"1987" => 228,
		"1988" => 272,
		"1989" => 120,
		"1990" => 223,
		"1991" => 216,
		"1992" => 67,
		"1993" => 138,
		"1994" => 15,
		"1995" => 107,
		"1996" => 240,
		"1997" => 271,
		"1998" => 107,
		"1999" => 240
	) );

	$plot->set_bgcolor("#dddddd");
	$plot->set_plot_bgcolor("white");

	$plot->set_x_axis_title("Years");
	$plot->set_y_axis_title("Number of apples");
#	$plot->set_x_axis_label_font(2);
#	$plot->set_x_axis_show_grid(true);
#	$plot->set_x_axis_label_up(true);

	$plot->set_margin(1,25,1,1);
	$plot->set_x_axis_position("bottom");
	$plot->set_y_axis_min_value(0);
	$plot->set_y_axis_max_value(300);
	$plot->set_y_axis_num_ticks(3);
	$plot->set_x_axis_label_up(true);
	$plot->set_y_axis_show_grid(true);
	$plot->set_marker_connected(true);

	$plot->draw();
Return current item: TVEz - Media Library