What is the issue with PHPlot legend entries being assigned colors automatically?

When PHPlot automatically assigns colors to legend entries, it can lead to inconsistent color schemes and make it difficult to match legend entries with corresponding data points. To solve this issue, we can manually assign colors to legend entries to ensure consistency and better visual representation.

// Manually assign colors to legend entries in PHPlot
$plot = new PHPlot(800, 600);
$plot->SetDataValues($data);
$plot->SetDataType('text-data');
$plot->SetPlotType('bars');
$plot->SetLegend($legend_entries);
$plot->SetLegendColor(array('red', 'blue', 'green', 'yellow')); // Manually assign colors
$plot->DrawGraph();