List of usage examples for org.jfree.chart.renderer XYDotRenderer XYDotRenderer
public XYDotRenderer()
From source file:org.jfree.chart.demo.ChartTiming2.java
/** * Runs the test./* www.j a va 2 s. c o m*/ */ public void run() { this.finished = false; // create a dataset... final XYDataset data = new SampleXYDataset2(1, 1440); // create a scatter chart... final boolean withLegend = true; final JFreeChart chart = ChartFactory.createScatterPlot("Scatter plot timing", "X", "Y", data, PlotOrientation.VERTICAL, withLegend, false, false); final XYPlot plot = chart.getXYPlot(); plot.setRenderer(new XYDotRenderer()); final BufferedImage image = new BufferedImage(400, 300, BufferedImage.TYPE_INT_RGB); final Graphics2D g2 = image.createGraphics(); final Rectangle2D chartArea = new Rectangle2D.Double(0, 0, 400, 300); // set up the timer... final Timer timer = new Timer(10000, this); timer.setRepeats(false); int count = 0; timer.start(); while (!this.finished) { chart.draw(g2, chartArea, null, null); System.out.println("Charts drawn..." + count); if (!this.finished) { count++; } } System.out.println("DONE"); }