[42] | 1 | <?php // content="text/plain; charset=utf-8"
|
---|
| 2 | require_once ('jpgraph/jpgraph.php');
|
---|
| 3 | require_once ('jpgraph/jpgraph_line.php');
|
---|
| 4 | require_once ('jpgraph/jpgraph_error.php');
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | //$datax = array(3.5,3.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
|
---|
| 8 | $datay = array(1.23,1.9,1.6,3.1,3.4,2.8,2.1,1.9);
|
---|
| 9 | $graph = new Graph(300,200);
|
---|
| 10 | $graph->img->SetMargin(40,40,40,40);
|
---|
| 11 | $graph->img->SetAntiAliasing();
|
---|
| 12 | $graph->SetScale("textlin");
|
---|
| 13 | $graph->SetShadow();
|
---|
| 14 | $graph->title->Set("Example of filled line centered plot");
|
---|
| 15 | $graph->title->SetFont(FF_FONT1,FS_BOLD);
|
---|
| 16 |
|
---|
| 17 | $p1 = new LinePlot($datay);
|
---|
| 18 | $p1->SetFillColor("green");
|
---|
| 19 | $p1->mark->SetType(MARK_FILLEDCIRCLE);
|
---|
| 20 | $p1->mark->SetFillColor("red");
|
---|
| 21 | $p1->mark->SetWidth(4);
|
---|
| 22 | $p1->SetColor("blue");
|
---|
| 23 | $p1->SetCenter();
|
---|
| 24 | $graph->Add($p1);
|
---|
| 25 |
|
---|
| 26 | $graph->Stroke();
|
---|
| 27 |
|
---|
| 28 | ?>
|
---|
| 29 |
|
---|
| 30 |
|
---|