SetScale('linlin',0,0,$xmin,$xmax); $graph->SetMargin($lm,$rm,10,30); $graph->SetMarginColor('white'); $graph->SetFrame(false); $graph->SetBox(true); $graph->title->Set('Example of combined graph with background'); $graph->title->SetFont(FF_ARIAL,FS_NORMAL,14); $graph->xaxis->SetTickPositions($tickPositions,$minTickPositions); $graph->xaxis->SetLabelFormatString('My',true); $graph->xgrid->Show(); $p1 = new LinePlot($datay,$datax); $graph->Add($p1); //---------------------- // Setup the bar graph //---------------------- $graph2 = new Graph($w,110); $graph2->SetScale('linlin',0,0,$xmin,$xmax); $graph2->SetMargin($lm,$rm,5,10); $graph2->SetMarginColor('white'); $graph2->SetFrame(false); $graph2->SetBox(true); $graph2->xgrid->Show(); $graph2->xaxis->SetTickPositions($tickPositions,$minTickPositions); $graph2->xaxis->SetLabelFormatString('My',true); $graph2->xaxis->SetPos('max'); $graph2->xaxis->HideLabels(); $graph2->xaxis->SetTickSide(SIDE_DOWN); $b1 = new BarPlot($datay2,$datax); $b1->SetFillColor('teal'); $b1->SetColor('teal:1.2'); $graph2->Add($b1); //----------------------- // Create a multigraph //---------------------- $mgraph = new MGraph(); $mgraph->SetImgFormat('jpeg',60); $mgraph->SetMargin(2,2,2,2); $mgraph->SetFrame(true,'darkgray',2); $mgraph->SetBackgroundImage('tiger1.jpg'); $mgraph->AddMix($graph,0,0,85); $mgraph->AddMix($graph2,0,250,85); $mgraph->Stroke(); ?>