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

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

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

	$plot->set_data( array (
		"Aug 2001" => 17,
		"Sep 2001" => 9,
		"Oct 2001" => 13,
		"Nov 2001" => 4,
		"Dec 2001" => 11
	) );

	$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(20);
	$plot->set_y_axis_num_ticks(4);
	$plot->set_y_axis_show_grid(true);

	$plot->set_marker_type("diamond");
	$plot->set_marker_size(6);
	$plot->set_marker_connected(true);
	$plot->set_marker_color("blue");
	$plot->set_line_color("blue");

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