<?php include '../class/Graficos.class.php'; include '../class/lib/PHPLot/phplot.php'; $cand = new Graficos(); $data = $cand->cargo_bens(); $plot = new PHPlot(800, 600); $plot->SetImageBorderType('plain'); $plot->SetPlotType('bars'); $plot->SetDataType('text-data'); $plot->SetDataValues($data); # Main plot title: $plot->SetTitle('Média de bens dos candidatos por cargo'); # Make a legend for the 3 data sets plotted: //$plot->SetLegend(array('Engineering', 'Manufacturing', 'Administration')); # Turn off X tick labels and ticks because they don't apply here: $plot->SetXTickLabelPos('none'); $plot->SetXTickPos('none'); $plot->DrawGraph();