예제 #1
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->partidos_bens();
$plot = new PHPlot(800, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('bars');
$plot->SetDataType('text-data');
$plot->SetDataValues($data);
# Main plot title:
$plot->SetTitle('Total de bens dos candidatos por partido');
# 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();