/** * Creates the given visualisation with the given data * * @param width * The width of the image * @param height * The height of the image * @param data * The data to visualise */ public BarVisualisationBasic(final int width, final int height, final double[] data) { super(width, height); this.setData(data); }
/** * Shows a basic bar visualisation. * @param args The bar visualisation. */ public static void main( final String[] args ) { final int nPoints = 10; final double[] data = new double[nPoints]; for( int i = 0; i < nPoints; i++ ) data[i] = nPoints*(Math.random()*2-1); final BarVisualisationBasic bv = new BarVisualisationBasic( 1000, 600 ); bv.setData( data ); bv.showWindow( "Bar Visualisation Demo" ); } }