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

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 1.0 KB
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once 'jpgraph/jpgraph.php';
3require_once 'jpgraph/jpgraph_line.php';
4require_once 'jpgraph/jpgraph_plotmark.inc.php';
5require_once 'jpgraph/jpgraph_scatter.php';
6require_once 'ccbpgraph.class.php';
7
8$graph = new CCBPGraph(600,400);
9$graph->SetTitle('Buffer penetration','(history added)');
10$graph->SetColorMap(1); 
11 
12 // Two "fake tasks with hostory
13$datax=array(75,83); $datay=array(110,64);
14$datax1 = array(33,50,67,83); $datay1 = array(86,76,80,64);
15$datax2 = array(18,47,58,75); $datay2 = array(80,97,105,110);
16
17$sp = new ScatterPlot($datay,$datax);
18$sp->mark->SetType(MARK_DIAMOND);
19$sp->mark->SetFillColor('white');
20$sp->mark->SetSize(12);
21
22$sp_hist = array();
23$sp_hist[0] = new LinePlot($datay1,$datax1);
24$sp_hist[0]->SetWeight(1);
25$sp_hist[0]->SetColor('white');
26
27$sp_hist[1] = new LinePlot($datay2,$datax2);
28$sp_hist[1]->SetWeight(1);
29$sp_hist[1]->SetColor('white');
30
31$graph->Add($sp_hist);
32$graph->Add($sp);
33
34$graph->Stroke();
35
36?>
Note: See TracBrowser for help on using the repository browser.