/** * Adds an observation to the dataset (by incrementing the item count for * the appropriate bin). A runtime exception is thrown if the value does * not fit into any bin. * * @param value the value. */ public void addObservation(double value) { addObservation(value, true); }
/** * Adds an observation to the dataset (by incrementing the item count for * the appropriate bin). A runtime exception is thrown if the value does * not fit into any bin. * * @param value the value. */ public void addObservation(double value) { addObservation(value, true); }
/** * Adds a set of values to the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param values the values ({@code null} not permitted). * * @see #clearObservations() */ public void addObservations(double[] values) { for (int i = 0; i < values.length; i++) { addObservation(values[i], false); } notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Adds a set of values to the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param values the values (<code>null</code> not permitted). * * @see #clearObservations() */ public void addObservations(double[] values) { for (int i = 0; i < values.length; i++) { addObservation(values[i], false); } notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Add a value to a specific series of the chart. * @param seriesname The series name. * @param valx The x value. * @param valy The y value. * @param data The data table. * @param row The current data row. */ protected void addValue(Comparable seriesname, Object valx, Object valy, DataTable data, Object[] row) { double val = ((Number)valy).doubleValue(); Number low = (Number)getProperty("lowvalue"); Number high = (Number)getProperty("highvalue"); if(val>=low.doubleValue() && val<=high.doubleValue()) { SimpleHistogramDataset dataset = (SimpleHistogramDataset)((XYPlot)getChart().getPlot()).getDataset(); dataset.addObservation(val); } // else // { // // print out of range warning? // } } }