<?php
include ("../img/jpgraph.php");
include (
"../img/jpgraph_log.php");
include (
"../img/jpgraph_line.php");
include (
"../img/jpgraph_scatter.php");


$ab2  = array( 1.5,  2.0,  2.5,  3.0,  4.0,  5.0,  6.0,  8.010.0,
              
12.015.020.025.030.040.050.060.0 ,75.0,
              
100.125.150.);
$mn2  = array( 0.5,  0.5,  0.5,  0.5,  0.8,  0.8,  0.8,  0.8,  1.0,
               
1.0,  1.0,  1.0,  1.0,  2.0,  2.0,  2.0,  2.0,  2.0,
               
5.0,  5.0,  5.0);
$rhos = array(30.031.032.034.035.537.538.039.541.5,
              
43.041.042.042.545.049.053.558.066.5,
              
75.081.089.0);

// Create the graph.
$graph = new Graph(500,300,"auto");     
$graph->SetScale("loglog");              
$graph->SetY2Scale("lin");               
$graph->y2axis->SetColor("blue","blue"); 

$graph->img->SetMargin(50,70,40,50);     
$graph->title->Set("Geoelektrik");       
$graph->xaxis->title->Set("Auslage ab/2 [m]");  
$graph->yaxis->title->Set("rho_s [Ohm m]");     
$graph->y2axis->title->Set("mn/2 [m]");         
$graph->y2axis->title->SetColor("blue");
$graph->y2axis->SetTitleMargin(35);
$graph->title->SetFont(FF_FONT1,FS_BOLD);       
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); 
$graph->xgrid->Show(true,true);                  
$graph->ygrid->Show(true,true);                  

// Create the linear plot

$lineplot=new LinePlot($rhos,$ab2);       
$lineplot->SetWeight(1);
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetWidth(2);

// Create scatter plot 

$scplot=new ScatterPlot($mn2,$ab2);
$scplot->mark->SetType(MARK_FILLEDCIRCLE);
$scplot->mark->SetColor("blue");
$scplot->mark->SetWidth(2);

// Add plots to the graph

$graph->AddY2($scplot);
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();

?>