List of usage examples for org.jfree.chart ChartFactory createBubbleChart
public static JFreeChart createBubbleChart(String title, String xAxisLabel, String yAxisLabel, XYZDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
From source file:edu.ucla.stat.SOCR.chart.ChartGenerator_JTable.java
private JFreeChart createXYZBubbleChart(String title, String xLabel, String yLabel, XYZDataset dataset) { JFreeChart chart = ChartFactory.createBubbleChart(title, xLabel, yLabel, dataset, orientation, true, true, false);/*from ww w . j a v a 2s . co m*/ XYPlot plot = (XYPlot) chart.getPlot(); plot.setForegroundAlpha(0.65f); XYItemRenderer renderer = plot.getRenderer(); renderer.setSeriesPaint(0, Color.blue); //renderer.setLegendItemLabelGenerator(new SOCRXYZSeriesLabelGenerator()); // increase the margins to account for the fact that the auto-range // doesn't take into account the bubble size... NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis(); domainAxis.setLowerMargin(0.15); domainAxis.setUpperMargin(0.15); NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setLowerMargin(0.15); rangeAxis.setUpperMargin(0.15); return chart; }