clearTheme(); $graph->SetScale("linlin"); $graph->SetY2Scale("lin"); $graph->SetMargin(50,50,60,40); $graph->SetMarginColor('darkblue'); $graph->SetColor('darkblue'); // Setup titles $graph->title->Set("Inverting both Y-axis"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->title->SetColor("white"); $graph->subtitle->Set("(Negated Y & Y2 axis)"); $graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); $graph->subtitle->SetColor("white"); // Setup axis $graph->yaxis->SetLabelFormatCallback("_cb_negate"); $graph->xaxis->SetColor("lightblue","white"); $graph->yaxis->SetColor("lightblue","white"); $graph->ygrid->SetColor("blue"); // Setup Y2 axis $graph->y2axis->SetLabelFormatCallback("_cb_negate"); $graph->y2axis->SetColor("darkred","white"); $graph->y2scale->SetAutoMax(0); // To make sure it starts with 0 // Setup plot 1 $lp1 = new LinePlot($ydata); $lp1->SetColor("yellow"); $lp1->SetWeight(2); $graph->Add($lp1); // Setup plot 2 $lp2 = new LinePlot($y2data); $lp2->SetColor("darkred"); $lp2->SetWeight(2); $graph->AddY2($lp2); $graph->Stroke(); ?>