Location: PHPKode > projects > Monyet > plotter/jpgraph-2.2/src/Examples/linebarex2.php
include ("../jpgraph.php");
include ("../jpgraph_line.php");
include ("../jpgraph_bar.php");

// Some data

for($i=0; $i<$steps; ++$i) {
	if( $i % 10 == 0 ) {

// New graph with a background image and drop shadow
$graph = new Graph(450,300,"auto");

// Use an integer X-scale

// Set title and subtitle
$graph->title->Set("Combined bar and line plot");
$graph->subtitle->Set("(\"left\" aligned bars)");

// Use built in font

// Make the margin around the plot a little bit bigger
// then default

// Slightly adjust the legend from it's default position in the
// top right corner to middle right side

// Create a red line plot
$p1 = new LinePlot($datay,$datax);
$p1->SetLegend("Status one");

// Create the bar plot
$b1 = new BarPlot($databary,$databarx);
$b1->SetLegend("Status two");

// Finally output the  image


Return current item: Monyet