/** * Adds a data item to the series and sends a {@link SeriesChangeEvent} to * all registered listeners. * * @param x the x-value. * @param y the y-value. * @param xLow the lower bound of the y-interval. * @param xHigh the upper bound of the y-interval. */ public void add(double x, double xLow, double xHigh, double y) { add(new XIntervalDataItem(x, xLow, xHigh, y), true); }
int[] bins = histogram.getBins(0); for (int j = 0; j < bins.length; j++) { histogramSeries.add(histogram.getBinLowValue(0, j), histogram.getBinLowValue(0, j), j < bins.length - 1 ? histogram.getBinLowValue(0, j + 1) : histogram.getHighValue(0), percentileSeries.add(0, 0, 1, histogram.getLowValue(0)); for (int j = 1; j < 99; j++) { percentileSeries.add(j, j, j + 1, histogram.getPTileThreshold(j / 100.0)[0]); percentileSeries.add(99, 99, 100,
int[] bins = histogram.getBins(0); for (int j = 0; j < bins.length; j++) { histogramSeries.add(histogram.getBinLowValue(0, j), histogram.getBinLowValue(0, j), j < bins.length - 1 ? histogram.getBinLowValue(0, j + 1) : histogram.getHighValue(0), percentileSeries.add(0, 0, 1, histogram.getLowValue(0)); for (int j = 1; j < 99; j++) { percentileSeries.add(j, j, j + 1, histogram.getPTileThreshold(j / 100.0)[0]); percentileSeries.add(99, 99, 100,
private void setStx(Stx stx) { if (stx != null) { HistogramPanelModel.HistogramConfig config = createHistogramConfig(); if (config == null) { return; } if (!model.hasStx(config)) { model.setStx(config, stx); } dataset = new XIntervalSeriesCollection(); final int[] binCounts = stx.getHistogramBins(); final RasterDataNode raster = getRaster(); final XIntervalSeries series = new XIntervalSeries(raster.getName()); final Histogram histogram = stx.getHistogram(); for (int i = 0; i < binCounts.length; i++) { final double xMin = histogram.getBinLowValue(0, i); final double xMax = i < binCounts.length - 1 ? histogram.getBinLowValue(0, i + 1) : histogram.getHighValue(0); series.add(xMin, xMin, xMax, binCounts[i]); } dataset.addSeries(series); } handleStxChange(); }
private void setStx(Stx stx) { if (stx != null) { HistogramPanelModel.HistogramConfig config = createHistogramConfig(); if (config == null) { return; } if (!model.hasStx(config)) { model.setStx(config, stx); } dataset = new XIntervalSeriesCollection(); final int[] binCounts = stx.getHistogramBins(); final RasterDataNode raster = getRaster(); final XIntervalSeries series = new XIntervalSeries(raster.getName()); final Histogram histogram = stx.getHistogram(); for (int i = 0; i < binCounts.length; i++) { final double xMin = histogram.getBinLowValue(0, i); final double xMax = i < binCounts.length - 1 ? histogram.getBinLowValue(0, i + 1) : histogram.getHighValue(0); series.add(xMin, xMin, xMax, binCounts[i]); } dataset.addSeries(series); } handleStxChange(); }