private JFreeChart createChart(CheapTimeSolution solution) {
NumberAxis rangeAxis = new NumberAxis("Period");
rangeAxis.setRange(-0.5, solution.getGlobalPeriodRangeTo() + 0.5);
XYPlot taskAssignmentPlot = createTaskAssignmentPlot(solution);
XYPlot periodCostPlot = createPeriodCostPlot(solution);
CombinedRangeXYPlot combinedPlot = new CombinedRangeXYPlot(rangeAxis);
combinedPlot.add(taskAssignmentPlot, 5);
combinedPlot.add(periodCostPlot, 1);
combinedPlot.setOrientation(PlotOrientation.HORIZONTAL);
return new JFreeChart("Cheap Power Time Scheduling", JFreeChart.DEFAULT_TITLE_FONT,
combinedPlot, true);
}