Line | |
---|
1 | <?php // content="text/plain; charset=utf-8" |
---|
2 | require_once ('jpgraph/jpgraph.php'); |
---|
3 | require_once ('jpgraph/jpgraph_scatter.php'); |
---|
4 | |
---|
5 | $datay = array(20,22,12,13,17,20,16,19,30,31,40,43); |
---|
6 | |
---|
7 | $graph = new Graph(300,200); |
---|
8 | $graph->SetScale("textlin"); |
---|
9 | |
---|
10 | $graph->SetShadow(); |
---|
11 | $graph->img->SetMargin(40,40,40,40); |
---|
12 | |
---|
13 | $graph->title->Set("Impuls plot, variant 2"); |
---|
14 | $graph->title->SetFont(FF_FONT1,FS_BOLD); |
---|
15 | $graph->xaxis->title->Set("Impuls respons"); |
---|
16 | $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); |
---|
17 | |
---|
18 | $sp1 = new ScatterPlot($datay);//,$datax); |
---|
19 | $sp1->mark->SetType(MARK_FILLEDCIRCLE); |
---|
20 | $sp1->mark->SetFillColor("red"); |
---|
21 | $sp1->mark->SetWidth(4); |
---|
22 | $sp1->SetImpuls(); |
---|
23 | $sp1->SetColor("blue"); |
---|
24 | $sp1->SetWeight(3); |
---|
25 | |
---|
26 | $graph->Add($sp1); |
---|
27 | $graph->Stroke(); |
---|
28 | |
---|
29 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.