Line | |
---|
1 | <?php // content="text/plain; charset=utf-8" |
---|
2 | require_once ('jpgraph/jpgraph.php'); |
---|
3 | require_once ('jpgraph/jpgraph_line.php'); |
---|
4 | |
---|
5 | $datay = array(0.2980,0.3039,0.3020,0.3027,0.3015); |
---|
6 | |
---|
7 | $graph = new Graph(300,200); |
---|
8 | $graph->img->SetMargin(40,40,40,40); |
---|
9 | |
---|
10 | $graph->img->SetAntiAliasing(); |
---|
11 | $graph->SetScale("textlin"); |
---|
12 | $graph->SetShadow(); |
---|
13 | $graph->title->Set("Example of 10% top/bottom grace"); |
---|
14 | $graph->title->SetFont(FF_FONT1,FS_BOLD); |
---|
15 | |
---|
16 | // Add 10% grace to top and bottom of plot |
---|
17 | $graph->yscale->SetGrace(10,10); |
---|
18 | |
---|
19 | $p1 = new LinePlot($datay); |
---|
20 | $p1->mark->SetType(MARK_FILLEDCIRCLE); |
---|
21 | $p1->mark->SetFillColor("red"); |
---|
22 | $p1->mark->SetWidth(4); |
---|
23 | $p1->SetColor("blue"); |
---|
24 | $p1->SetCenter(); |
---|
25 | $graph->Add($p1); |
---|
26 | |
---|
27 | $graph->Stroke(); |
---|
28 | |
---|
29 | ?> |
---|
30 | |
---|
31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.