
30/04/2007, 16:30
|
| | Fecha de Ingreso: enero-2007
Mensajes: 105
Antigüedad: 18 años, 3 meses Puntos: 0 | |
ayuda con grafica de phplot Alguien me puede ayudar con una grafica de PHPlot? la cree de esta manera pero necesito poner una leyende debajo de cada barra para especificar de que se trata cada una.
Alguien me puede ayudar por favor.
Gracias por adelantado.
<?
include_once("phplot/phplot.php");
$gra=new PHPLot(350,250);
$dat=array(
array(" ",30,20,25,50,40,35,70,60,25,63,42,53,61),
);
$gra->SetDataValues($dat);
$gra->SetLineStyles('solid');
$gra->SetBackgroundColor(array(255,255,255));
$gra->SetPlotType('bars');
//Titulos
//$gra->SetYTitle("Euros/hora");
//$gra->SetXTitle("Mes");
//Fuentes TTF
$gra->SetTTFPath(getcwd());
$gra->SetDefaultTTFont("times.ttf");
$gra->SetUseTTF(1);
$gra->SetFont("title","times.ttf",18);
$gra->SetFont("x_title","times.ttf",10);
$gra->SetFont("y_title","times.ttf",8);
//Leyenda
//$gra->SetLegend(array("Antonio","Pedro","Juan","Susana" ));
//$gra->SetLegendPixels(50,50);
//Escala
$gra->SetPlotAreaWorld(NULL,0,NULL,150);
$gra->SetYTickIncrement(20);
$gra->SetDrawYGrid(1);
$gra->SetDrawXGrid(1);
$gra->SetXTickLabelPos('none');
$gra->SetNumXTicks(4);
$gra->DrawGraph();
?> |