Choisir valeur abscisse JpGraph
Résolu
Melooo
Messages postés
1476
Statut
Membre
-
Melooo Messages postés 1476 Statut Membre -
Melooo Messages postés 1476 Statut Membre -
Bonjour,
Je suis en train de réaliser un graphe en courbe de 90°.
J'ai bien toutes mes courbes qui s'affichent, mon souci est sur l'axe des abscisses, actuellement j'ai 10 valeurs en abscisse, or je n'en veux que 6 (0, 0.005, 0.010, 0.015, 0.020, 0.025)
Mais quoique je fasse il me mets pas ce que je veux même en utilisant les intervalles.
Merci de votre aide.
Je suis en train de réaliser un graphe en courbe de 90°.
J'ai bien toutes mes courbes qui s'affichent, mon souci est sur l'axe des abscisses, actuellement j'ai 10 valeurs en abscisse, or je n'en veux que 6 (0, 0.005, 0.010, 0.015, 0.020, 0.025)
Mais quoique je fasse il me mets pas ce que je veux même en utilisant les intervalles.
Merci de votre aide.
A voir également:
- Choisir valeur abscisse JpGraph
- Logiciel gratuit calcul valeur nutritionnelle - Télécharger - Santé & Bien-être
- Quel macbook choisir - Guide
- Valeur relative et absolue - Forum Excel
- Comment choisir une musique comme sonnerie - Guide
- Graphique excel date en abscisse ✓ - Forum Excel
2 réponses
et as-tu essayé d'inscrire les valeurs en 'dur' dans le tableau ?
$y_labels = array('0', '0.005', '0.010', '0.015', '0.020', '0.025');
La solution a été trouvé :
Merci
$datay = array($_GET['al'],$_GET['an'],$_GET['a'],$_GET['be'],$_GET['cd'],$_GET['pb'],$_GET['hg'],$_GET['ni']);
$graph = new Graph(450,400,'auto');
$valmax=max($datay);
$echelle='0.005';
$graph->SetScale("textlin",0,'0.025');
$graph->SetShadow();
$graph->Set90AndMargin(70,30,90,30);
$graph->xaxis->hide();
$graph->yaxis->scale->ticks->Set(0.005,0.0005);
$bplot = new BarPlot($datay);
$bplot->SetFillColor(array("green","red", "blue"));
$bplot->SetShadow();
$bplot->SetWidth(0.5);
$bplot->value->Show();
$bplot->value->SetColor("blue","darkred");
$bplot->value->SetFormat('%3f');
$graph->Add($bplot);
$graph->Stroke();
Merci
$datay = array($_GET['al'],$_GET['an'],$_GET['a'],$_GET['be'],$_GET['cd'],$_GET['pb'],$_GET['hg'],$_GET['ni']); $graph = new Graph(450,500,'auto'); $graph->SetScale("textlin"); $graph->SetShadow(); $graph->Set90AndMargin(70,30,90,30); $graph->img->SetAngle(90); $graph->xaxis->hide(); $y_labels = array(0, 0.005, 0.010, 0.015, 0.020, 0.025); $graph->yaxis->SetTickLabels($y_labels); $graph->yaxis->SetLabelFormat('%0.3f'); $graph->yaxis->scale->SetGrace(1); $bplot = new BarPlot($datay); $bplot->SetFillColor(array("green","red", "blue")); $bplot->SetShadow(); $bplot->value->Show(); $bplot->value->SetColor("blue","darkred"); $bplot->value->SetFormat('%d Eur.'); $graph->Add($bplot); $graph->Stroke();$datay = array($_GET['al'],$_GET['an'],$_GET['a'],$_GET['be'],$_GET['cd'],$_GET['pb'],$_GET['hg'],$_GET['ni']); $graph = new Graph(450,500,'auto'); $graph->SetScale("textlin"); $graph->SetShadow(); $graph->Set90AndMargin(70,30,90,30); $graph->img->SetAngle(90); $graph->xaxis->hide(); $y_labels = array(0, 0.005, 0.010, 0.015, 0.020, 0.025); $graph->yaxis->SetTickLabels($y_labels); $graph->yaxis->SetLabelFormat('%0.3f'); $graph->yaxis->scale->SetGrace(1); $bplot = new BarPlot($datay); $bplot->SetFillColor(array("green","red", "blue")); $bplot->SetShadow(); $bplot->value->Show(); $bplot->value->SetColor("blue","darkred"); $bplot->value->SetFormat('%d Eur.'); $graph->Add($bplot); $graph->Stroke();En abscisse il m'affiche seulement des 0.
Mon histogramme est horizontale !