yData.add(10 * Math.exp(-i));
errorBars.add(Math.random() + .3);
}
// Create Chart
Chart chart = new ChartBuilder().width(800).height(600).title("ScatterChart04").xAxisTitle("X").yAxisTitle("Y").chartType(ChartType.Scatter).build();
// Customize Chart
chart.getStyleManager().setChartTitleVisible(false);
chart.getStyleManager().setLegendVisible(false);
chart.getStyleManager().setAxisTitlesVisible(false);
// Series
Series series = chart.addSeries("10^(-x)", xData, yData, errorBars);
series.setMarkerColor(Color.RED);
series.setMarker(SeriesMarker.SQUARE);
return chart;
}