source: trunk/xgraph/jpgraph/Examples/bartutex1.php

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 756 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_bar.php');
4
5// Some data
6$databary=array(12,7,16,5,7,14,9,3);
7
8// New graph with a drop shadow
9$graph = new Graph(300,200);
10$graph->SetShadow();
11
12// Use a "text" X-scale
13$graph->SetScale("textlin");
14
15// Set title and subtitle
16$graph->title->Set("Elementary barplot with a text scale");
17
18// Use built in font
19$graph->title->SetFont(FF_FONT1,FS_BOLD);
20
21// Create the bar plot
22$b1 = new BarPlot($databary);
23$b1->SetLegend("Temperature");
24//$b1->SetAbsWidth(6);
25//$b1->SetShadow();
26
27// The order the plots are added determines who's ontop
28$graph->Add($b1);
29
30// Finally output the  image
31$graph->Stroke();
32
33?>
34
35
Note: See TracBrowser for help on using the repository browser.