= new DefaultStatisticalCategoryDataset();
dataset.add(1.0, 2.0, "S1", "C1");
dataset.add(new Double(4.0), null, "S1", "C2");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new StatisticalBarRenderer());
plot.setOrientation(PlotOrientation.HORIZONTAL);
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;