List of usage examples for org.jfree.data.xy NormalizedMatrixSeries setScaleFactor
public void setScaleFactor(double factor)
From source file:org.jfree.chart.demo.BubblyBubblesDemo2.java
/** * Creates a series./*w w w.j av a 2s . c om*/ * * @return The series. */ private NormalizedMatrixSeries createInitialSeries() { final NormalizedMatrixSeries newSeries = new NormalizedMatrixSeries("Sample Grid 1", SIZE, SIZE); // seed a few random bubbles for (int count = 0; count < SIZE * 3; count++) { final int i = (int) (Math.random() * SIZE); final int j = (int) (Math.random() * SIZE); final double mij = Math.random() * 1; newSeries.update(i, j, mij); } newSeries.setScaleFactor(newSeries.getItemCount()); return newSeries; }
From source file:org.jfree.chart.demo.BubblyBubblesDemo.java
/** * Creates a series.// w w w . j ava2s .c o m * * @return The series. */ private NormalizedMatrixSeries createInitialSeries() { final NormalizedMatrixSeries newSeries = new NormalizedMatrixSeries("Sample Grid 1", SIZE, SIZE); // seed a few random bubbles for (int count = 0; count < SIZE; count++) { final int i = (int) (Math.random() * SIZE); final int j = (int) (Math.random() * SIZE); final int mij = (int) (Math.random() * SIZE); newSeries.update(i, j, mij); } newSeries.setScaleFactor(newSeries.getItemCount()); return newSeries; }