/** * Refreshes the histogram content. Call this method when the values in the * values map changed to update histogram display. */ public void refresh() { final double old = getThreshold(); key = allKeys.get( jComboBoxFeature.getSelectedIndex() ); final double[] values = valuesMap.get( key ); if ( null == values || 0 == values.length ) { dataset = new LogHistogramDataset(); annotation.setLocation( 0.5f, 0.5f ); annotation.setText( "No data" ); } else { final int nBins = TMUtils.getNBins( values, 8, 100 ); dataset = new LogHistogramDataset(); if ( nBins > 1 ) { dataset.addSeries( DATA_SERIES_NAME, values, nBins ); } } plot.setDataset( dataset ); threshold = old; chartPanel.repaint(); }
dataset = new LogHistogramDataset(); chart = ChartFactory.createHistogram( null, null, null, dataset, PlotOrientation.VERTICAL, false, false, false );
dataset = new LogHistogramDataset(); chart = ChartFactory.createHistogram( null, null, null, dataset, PlotOrientation.VERTICAL, false, false, false );
/** * Refreshes the histogram content. Call this method when the values in the * values map changed to update histogram display. */ public void refresh() { final double old = getThreshold(); key = allKeys.get( jComboBoxFeature.getSelectedIndex() ); final double[] values = valuesMap.get( key ); if ( null == values || 0 == values.length ) { dataset = new LogHistogramDataset(); annotation.setLocation( 0.5f, 0.5f ); annotation.setText( "No data" ); } else { final int nBins = TMUtils.getNBins( values, 8, 100 ); dataset = new LogHistogramDataset(); if ( nBins > 1 ) { dataset.addSeries( DATA_SERIES_NAME, values, nBins ); } } plot.setDataset( dataset ); threshold = old; chartPanel.repaint(); }
dataset = new LogHistogramDataset(); threshold = Double.NaN; annotation.setLocation( 0.5f, 0.5f ); dataset = new LogHistogramDataset(); if ( nBins > 1 ) dataset.addSeries( DATA_SERIES_NAME, values, nBins );
dataset = new LogHistogramDataset(); threshold = Double.NaN; annotation.setLocation( 0.5f, 0.5f ); dataset = new LogHistogramDataset(); if ( nBins > 1 ) dataset.addSeries( DATA_SERIES_NAME, values, nBins );