s2.add(20.0, 3.5);
dataset.addSeries(s2);
XYPlot plot = new XYPlot(dataset,
new NumberAxis("X"), new NumberAxis("Y"),
new XYLineAndShapeRenderer());
plot.addAnnotation(new XYTitleAnnotation(5.0, 6.0,
new TextTitle("Hello World!")));
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;