$x = array(20, 25, 20, 18, 16, 25, 29, 12, 15, 18, 21, 26); $plot = new BarPlot($x, 2, 2); $plot->setBarColor(new Color(120, 175, 80, 10)); $plot->setBarPadding(0.15, 0.15); $plot->barShadow->setSize(3); $plot->barShadow->smooth(TRUE); $plot->barShadow->setColor(new Color(200, 200, 200, 10)); $group->legend->add($plot, "Green bar", LEGEND_BACKGROUND); $group->add($plot); // Add a second bar plot $x = array(12, 14, 10, 9, 10, 16, 12, 8, 8, 10, 12, 13); $plot = new BarPlot($x, 2, 2); $plot->setBarColor(new Orange()); $plot->setBarPadding(0.15, 0.15); $group->legend->add($plot, "Orange bar", LEGEND_BACKGROUND); $group->add($plot); // Add a line plot $x = array(6, 5, 6, 5.5, 4.5, 4, 4.5, 4, 5, 4, 5, 5.5); $plot = new LinePlot($x, LINEPLOT_MIDDLE); $plot->setColor(new DarkBlue()); $plot->setThickness(5); $plot->setYAxis(PLOT_RIGHT); $plot->setYMax(12); $plot->mark->setType(MARK_CIRCLE); $plot->mark->setSize(6); $plot->mark->setFill(new LightBlue()); $plot->mark->border->show(); $group->legend->add($plot, "Blue line", LEGEND_MARK); $group->add($plot); $graph->add($group); $graph->draw();