It is Version: v4.4.2 and here's the line that cause the error:
$lineplot->SetLegend(['Mean', '2.5th Percentile', '97.5th Percentile']);
If I put :
$lineplot->SetLegend('Mean, 2.5th Percentile, 97.5th Percentile');
it just plot this string as the one line in legend.
Here are code lines that create the graph:
// Create a line plot for your data points
$data = [$mean, $percentile_2_5, $percentile_97_5];
$lineplot = new LinePlot($data);