Location: PHPKode > projects > Monyet > plotter/jpgraph-2.2/src/Examples/barintex2.php
// $Id: barintex2.php,v 1.2 2002/07/11 23:27:28 aditus Exp $
include ("../jpgraph.php");
include ("../jpgraph_bar.php");

// Some data

// Create the graph and setup the basic parameters 
$graph = new Graph(460,200,'auto');	

// Add some grace to the top so that the scale doesn't
// end exactly at the max value. 

// Setup X-axis labels
$a = $gDateLocale->GetShortMonth();

// Stup "hidden" y-axis by given it the same color
// as the background

// Setup graph title ands fonts
$graph->title->Set('Example of integer Y-scale');
$graph->subtitle->Set('(With "hidden" y-axis)');

$graph->xaxis->title->Set("Year 2002");
// Create a bar pot
$bplot = new BarPlot($datay);

// Setup the values that are displayed on top of each bar
// Must use TTF fonts if we want text at an arbitrary angle
// Black color for positive values and darkred for negative values

// Finally stroke the graph
Return current item: Monyet