List of usage examples for org.jfree.data.xy NormalizedMatrixSeries getItemCount
@Override public int getItemCount()
From source file:org.jfree.chart.demo.BubblyBubblesDemo2.java
/** * Creates a series.//w ww . j a v a 2s. com * * @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 ww . jav a2s . 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; }