I'm trying to use JpGraph to generate bar charts but the result is pretty ugly.

Code:
require_once('jpgraph_bar.php');   

$bplot = new BarPlot($xdata);   
  
$bplot->SetLegend('Investments');   
  
$bplot2 = new BarPlot($ydata);  
$bplot2->SetLegend('Profit');   
  
$accbplot = new AccBarPlot(array($bplot, $bplot2));  
$accbplot->SetColor('darkgray');  
$accbplot->SetWeight(1);   
  
$graph->Add($accbplot);
Could you suggest some other library or am I sumply using the tool wrong? The snippet I try is taken from
How to Create Graphs Using JpGraph in PHP Applications