SetTitle('Example - Bar Chart with gradient colors'); $p->SetDataType('text-data'); $p->SetDataValues($data); $p->SetPlotAreaWorld(0, 0, $x_values, 100); # This isn't necessary, as we do know how many data sets (bars_per_group): $n_data = count_data_sets($data, 'text-data'); # Make a gradient color map: $colors = color_range($p->SetRGBColor('SkyBlue'), $p->SetRGBColor('DarkGreen'), $n_data); $p->SetDataColors($colors); $p->SetXTickLabelPos('none'); $p->SetXTickPos('none'); $p->SetPlotType('bars'); $p->DrawGraph();