/** * Default construcotr */ public DotPlotVisualisation() { super( null ); this.setItemPlotter( this ); }
/** * Main method to demonstrate the vis. * @param args command-line args (not used) */ public static void main( final String[] args ) { final DotPlotVisualisation dpv = new DotPlotVisualisation( 1000, 600 ); dpv.axesRenderer2D.setMaxXValue( 1 ); dpv.axesRenderer2D.setMinXValue( -1 ); dpv.axesRenderer2D.setMaxYValue( 1 ); dpv.axesRenderer2D.setMinYValue( -1 ); dpv.axesRenderer2D.setxMajorTickSpacing( 0.2 ); dpv.axesRenderer2D.setxMinorTickSpacing( 0.1 ); dpv.axesRenderer2D.setyMajorTickSpacing( 0.2 ); dpv.axesRenderer2D.setyMinorTickSpacing( 0.1 ); dpv.axesRenderer2D.setxAxisPosition( 300 ); dpv.setAutoScaleAxes( false ); dpv.setColourMapRange( 0, 0.2 ); for( int i = 0; i < 10; i++ ) dpv.addPoint( (Math.random()-0.5)*2, (Math.random()-0.5)*2, i/50d ); dpv.updateVis(); dpv.showWindow( "Dot plot" ); } }
final DotPlotVisualisation dpv = new DotPlotVisualisation(); final WorldMap<ColouredDot> wm = new WorldMap<ColouredDot>( 1280, 720, dpv );
/** * Constructor that takes the width and height of the visualisation * * @param width The width of the visualisation in pixels * @param height The height of the visualisation in pixels */ public DotPlotVisualisation( final int width, final int height ) { super( width, height, null ); this.setItemPlotter( this ); }